summaryrefslogtreecommitdiff
path: root/selfpublish.sh
diff options
context:
space:
mode:
Diffstat (limited to 'selfpublish.sh')
-rw-r--r--selfpublish.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/selfpublish.sh b/selfpublish.sh
index bdeb086..9b263e4 100644
--- a/selfpublish.sh
+++ b/selfpublish.sh
@@ -128,10 +128,20 @@ get_dyndns_domain()
128 128
129enable_apache_modules() 129enable_apache_modules()
130{ 130{
131 local restart=
131 for MODULE in $APACHE_MODULES 132 for MODULE in $APACHE_MODULES
132 do 133 do
133 a2enmod $MODULE >/dev/null 134 if ! [ -e /etc/apache2/mods-enabled/$MODULE.load ] &&
135 ! [ "$MODULE" = cgi -a -e /etc/apache2/mods-enabled/cgid.load ]
136 then
137 a2enmod $MODULE >/dev/null
138 restart=y
139 fi
134 done 140 done
141 if [ "$restart" ]
142 then
143 systemctl restart apache2
144 fi
135} 145}
136 146
137site_conf_template() 147site_conf_template()
@@ -284,7 +294,6 @@ then
284 systemctl reload apache2 || systemctl restart apache2 294 systemctl reload apache2 || systemctl restart apache2
285else 295else
286 enable_apache_modules 296 enable_apache_modules
287 systemctl restart apache2
288 install_self_to_site 297 install_self_to_site
289 install_header_to_site 298 install_header_to_site
290fi 299fi