opensnitch/ui/debian/postinst
Gustavo Iñiguez Goia 9529830010 Improved UI deb package generation
This is highly experimental and not Debian compliant.
We'll keep improving it over time.
2020-02-18 23:30:56 +01:00

31 lines
903 B
Bash
Executable file

#!/bin/sh
set -e
for i in $(ls /home)
do
path=/home/$i/.config/autostart/
if [ ! -d $path ]; then
mkdir -p $path
fi
if [ -f /usr/share/applications/opensnitch_ui.desktop ];then
cp /usr/share/applications/opensnitch_ui.desktop $path
fi
done
DIALOG=$(which whiptail || which dialog)
$DIALOG --yesno "OpenSnitch GUI needs to install 3 more packages from
pypi using pip3: unicode_slugify, grpcio-tools and protobuf.\n\nDo you want to install them
now?" 15 60
if [ $? -eq 0 ]; then
echo "Installing grpcio-tools..."
pip3 install grpcio-tools || echo "Unable to install grpcio, try it manually."
echo
echo "Installing protobuf..."
pip3 install protobuf || echo "Unable to install protobuf, try it manually."
echo
echo "Installing slugify..."
pip3 install unicode_slugify || echo "Unable to install unicode_slugify, try it manually."
fi