abra.sh post-deployment command to install apps

This commit is contained in:
Moritz 2022-11-08 15:46:13 +01:00
parent 992992d678
commit 827cb16964
2 changed files with 18 additions and 1 deletions

View File

@ -19,4 +19,5 @@ EXTRA_VOLUME=/dev/null:/tmp/.dummy
# X_FRAME_OPTIONS_ENABLED=1
# X_FRAME_OPTIONS_ALLOW_FROM=embedding-site.example.org
# APPS="calendar" "sociallogin" "onlyoffice"
# APPS="calendar sociallogin onlyoffice"

16
abra.sh
View File

@ -13,6 +13,22 @@ sub_occ(){
sub_app_run php /var/www/html/occ "$@"
}
run_occ(){
su -p www-data -s /bin/sh -c "/var/www/html/occ $@"
}
install_apps(){
install_apps="$@"
if [ -z "$install_apps" ]
then
install_apps=$APPS
fi
for app in $install_apps
do
run_occ "app:install $app"
done
}
_backup_app() {
# Copied _abra_backup_dir to make UX better on restore and backup
{