Skip to content

Commit

Permalink
added config to disable admin and apache modules
Browse files Browse the repository at this point in the history
  • Loading branch information
jdabat committed Jun 19, 2024
1 parent a99d288 commit 719a736
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,25 @@ add_sso_config_command() {
fi
}

disable_appache_modules() {
if [ -n "$DISABLE_APPACHE_MODULES" ]; then

for module in $DISABLE_APPACHE_MODULES; do
a2dismod module -f
done

apache2ctl restart

fi
}


disable_admin() {
if [ -n "$DISABLE_ADMIN" ]; then
sudo -u www-data php occ user:disable $DISABLE_ADMIN
fi
}

######
# main
######
Expand All @@ -172,6 +191,8 @@ if [ "$isThemingEnabled" = True ]; then
fi
run_post_config_command
add_sso_config_command
disable_appache_modules
disable_admin
echo "Configuration script finished successfully!"

echo "The configuration script was executed" > /var/www/html/executed

0 comments on commit 719a736

Please sign in to comment.