opensnitch/ui/debian/postinst
Gustavo Iñiguez Goia f88b78d5bb Improved UI debian package and bump version to rc3
Removed some dependencies, and ask to install via pip.
Added copyright file.
2020-02-18 10:47:17 +01:00

31 lines
885 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 and protobuf.\n\nDo you want to install them
now?" 15 60
if [ $? -eq 0 ]; then
echo "Installing grpcio..."
pip3 install grpcio || 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