pre_install() { end=$((SECONDS+10)) while : do if [ -z "$(ps -eo args | grep WindscribeEngine | grep -v grep)" ]; then echo "No WindscribeEngine running" break fi if [ $SECONDS -gt $end ]; then echo 'Error during Windscribe installation. WindscribeEngine is running. Please re-launch Windscribe. And try to update again.' exit 1 fi done # Stop and disable firewalld service if it is active, otherwise it will conflict with iptables on OS reboot # Relevant for Fedora distributions systemctl is-active --quiet firewalld if [ $? -eq 0 ] then echo "Firewalld service is running. It will be stopped and disabled to avoid conflicts with the Windscribe iptables firewall." sudo systemctl stop firewalld sudo systemctl disable firewalld fi echo "Finish pre-install script" } post_install() { xdg-icon-resource forceupdate --theme hicolor &> /dev/null systemctl enable windscribe-helper systemctl start windscribe-helper update-desktop-database -q } pre_upgrade() { systemctl stop windscribe-helper systemctl disable windscribe-helper pre_install } post_upgrade() { post_install } pre_remove() { systemctl stop windscribe-helper systemctl disable windscribe-helper } post_remove() { xdg-icon-resource forceupdate --theme hicolor &> /dev/null update-desktop-database -q }