File: /var/lib/dpkg/info/imunify360-php-daemon.postinst
#!/bin/sh
if [ "$1" = "configure" ]; then
systemctl --system stop imunify360-php-daemon.socket >/dev/null 2>&1 || :
systemctl --system stop imunify360-php-daemon.service >/dev/null 2>&1 || :
rm -rf /var/lib/imunify360/events.db >/dev/null 2>&1 || :
# deprive other users access to app data for releases upto 2.0.2-5
chmod -R o-rwx /var/lib/imunify360-php-daemon
mkdir -vp /var/lib/imunify360/events.db
# disable file-based gw until im-firewall 8.3.0 is released
rm /usr/share/i360-php-opts/.use_file_gw || true
systemctl --system unmask imunify360-php-daemon.service
systemctl --system unmask imunify360-php-daemon.socket
systemctl --system restart imunify360-php-daemon.socket
fi
exit 0