Updated apache module to use vars

This commit is contained in:
2020-12-09 15:13:23 +01:00
parent 2a6de08f75
commit 95f2a19422
15 changed files with 88 additions and 58 deletions

View File

@@ -20,13 +20,13 @@ if [ -n "$1" ]; then
if [[ "$1" = "-d" && "$PhpMA" != 0 ]]; then
echo "Disable PhpMyadmin"
sed -i '/PhpMA=/c\PhpMA=0' /etc/ICTM/toggle.conf
sed -i --follow-symlinks '/#enables\/disables PHPMyadmin/!b;n;cdeny from all' /etc/apache2/sites-enabled/010-Backend.conf
systemctl reload apache2
sed -i --follow-symlinks '/#enables\/disables PHPMyadmin/!b;n;cdeny from all' /APADIR/sites-enabled/010-Backend.conf
systemctl reload APASRV
elif [[ "$1" = "-e" && "$PhpMA" != 1 ]]; then
echo "Enable PhpMyadmin"
sed -i '/PhpMA=/c\PhpMA=1' /etc/ICTM/toggle.conf
sed -i --follow-symlinks '/#enables\/disables PHPMyadmin/!b;n;c#deny from all' /etc/apache2/sites-enabled/010-Backend.conf
systemctl reload apache2
sed -i --follow-symlinks '/#enables\/disables PHPMyadmin/!b;n;c#deny from all' /APADIR/sites-enabled/010-Backend.conf
systemctl reload APASRV
elif [[ "$1" = "-h" ]]; then
usage
else