opensnitch/ui/debian/postinst

32 lines
903 B
Text
Raw Normal View History

#!/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