Updated apache module to use vars
This commit is contained in:
@@ -8,8 +8,9 @@ webserv=WebServer
|
||||
webservice=WebServer
|
||||
|
||||
#Correcting service name for Apache
|
||||
if [ $webservice = apache ]; then
|
||||
webservice=apache2
|
||||
if [ $webservice = apache ]; then\
|
||||
source /etc/ICTM/apachevar.list
|
||||
webservice="$apacheService"
|
||||
ext=.conf
|
||||
fi
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user