File: //var/lib/dpkg/info/fastpanel2-php70.postinst
#!/bin/bash
if [ -z "$2" ]; then
for extension in bcmath bz2 curl exif gd gettext intl ioncube mbstring memcached mysqli opcache pcntl pdo_mysql pdo_pgsql shmop sockets xmlrpc xsl zip pgsql; do
if [ ! -f /opt/php70/conf.d/$extension.ini ]; then
ln -s /opt/php70/mods-available/$extension.ini /opt/php70/conf.d/$extension.ini
fi
done
fi
systemctl daemon-reload
systemctl enable fp2-php70-fpm
if systemctl -q is-active fp2-php70-fpm.service ; then
systemctl reload fp2-php70-fpm.service
else
systemctl start fp2-php70-fpm.service
fi
if systemctl -q is-active apache2.service ; then
systemctl reload apache2.service
fi