42 lines
1.2 KiB
Bash
Executable File
42 lines
1.2 KiB
Bash
Executable File
#!/usr/local/bin/bash
|
|
|
|
# Copyright (c) 2018-2021, diyIT.org
|
|
# All rights reserved.
|
|
#
|
|
# BSD 2-Clause License ("Simplified BSD License" or "FreeBSD License")
|
|
# https://diyit.org/license/
|
|
#
|
|
#
|
|
|
|
web_jails=(cloud hub nivi rachna rishabh sharad web web-diyit web-datavpc ldap-mgr r-ldap-mgr monitor)
|
|
|
|
for i in ${web_jails[@]};
|
|
do
|
|
echo ""
|
|
echo "## checking $i JAIL configs after Apache and/or PHP updates ##"
|
|
iocage exec $i "diff /usr/local/etc/apache24/httpd.conf /mnt/config/httpd.conf"
|
|
iocage exec $i "diff /usr/local/etc/php.ini /mnt/config/php.ini"
|
|
if [[ "$i" != "ldap-mgr" && "$i" != "r-ldap-mgr" ]]; then
|
|
iocage exec $i "diff /usr/local/etc/php-fpm.d/www.conf /mnt/config/www.conf"
|
|
fi
|
|
echo "####"
|
|
done
|
|
|
|
echo ""
|
|
echo "check in output above if php.ini or php-fpm also need to be restored"
|
|
|
|
echo ""
|
|
read -p "Return/Enter to restore httpd.conf files, ctrl-c to abort? " RESP
|
|
|
|
for i in ${web_jails[@]};
|
|
do
|
|
echo ""
|
|
echo "restoring httpd.conf in web_jail $i after Apache update"
|
|
iocage exec $i "cp /mnt/config/httpd.conf /usr/local/etc/apache24/httpd.conf"
|
|
iocage exec $i "service apache24 restart"
|
|
done
|
|
|
|
echo ""
|
|
echo "checking pkgp jail nginx instance is running"
|
|
iocage exec pkgp "service nginx status"
|