2020-02-06 23:17:43 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2020-02-22 17:22:28 +01:00
|
|
|
install_pip_pkgs()
|
|
|
|
{
|
|
|
|
DIALOG=$(which whiptail || which dialog)
|
|
|
|
|
|
|
|
$DIALOG --yesno "OpenSnitch GUI needs to install 3 more packages:
|
|
|
|
unicode_slugify, grpcio-tools and protobuf.
|
|
|
|
|
|
|
|
Note: It's better to install them as regular user instead of root:
|
2020-03-12 00:50:21 +01:00
|
|
|
pip3 install --user unicode_slugify grpcio-tools
|
2020-02-22 17:22:28 +01:00
|
|
|
|
2020-02-23 01:17:39 +01:00
|
|
|
Do you want to install them now?" 15 70
|
2020-02-22 17:22:28 +01:00
|
|
|
if [ $? -eq 0 ]; then
|
|
|
|
echo "Installing grpcio-tools..."
|
|
|
|
pip3 install grpcio-tools || echo "Unable to install grpcio, try it manually."
|
|
|
|
echo
|
|
|
|
echo "Installing slugify..."
|
|
|
|
pip3 install unicode_slugify || echo "Unable to install unicode_slugify, try it manually."
|
|
|
|
fi
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
2020-02-06 23:17:43 +01:00
|
|
|
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
|
2020-02-22 17:22:28 +01:00
|
|
|
ln -s /usr/share/applications/opensnitch_ui.desktop $path || true
|
2020-02-06 23:17:43 +01:00
|
|
|
fi
|
|
|
|
done
|
2020-02-18 10:47:17 +01:00
|
|
|
|
2020-02-22 17:22:28 +01:00
|
|
|
set +e
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
configure)
|
|
|
|
install_pip_pkgs
|
|
|
|
;;
|
|
|
|
esac
|
2020-02-18 10:47:17 +01:00
|
|
|
|