opensnitch/ui/debian/postinst
Gustavo Iñiguez Goia 0139e28c38 UI deb package: removed duplicated dependency.
protobuf is already installed by the grpcio-tools package.
2020-03-12 00:50:21 +01:00

44 lines
1 KiB
Bash
Executable file

#!/bin/sh
set -e
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:
pip3 install --user unicode_slugify grpcio-tools
Do you want to install them now?" 15 70
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
}
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
ln -s /usr/share/applications/opensnitch_ui.desktop $path || true
fi
done
set +e
case "$1" in
configure)
install_pip_pkgs
;;
esac