envole/src/envole-1.0/volume/nextcloud/prestart/prestart.sh

75 lines
2.0 KiB
Bash
Raw Normal View History

2023-11-02 14:22:16 +01:00
#!/bin/bash
run_as() {
if [ "$(id -u)" = 0 ]; then
su -p www-data -s /bin/sh -c "$1"
else
sh -c "$1"
fi
}
echo
echo "== INSTALLATION APP NEXTCLOUD ================================================"
echo
echo "== CALENDAR"
run_as 'php occ app:install calendar'
run_as 'php occ app:update calendar'
run_as 'php occ app:enable calendar'
echo
echo "==GROUP FOLDERS"
run_as 'php occ app:install groupfolders'
run_as 'php occ app:update groupfolders'
run_as 'php occ app:enable groupfolders'
echo
echo "== DECK"
run_as 'php occ app:install deck'
run_as 'php occ app:update deck'
run_as 'php occ app:enable deck'
echo
echo "== DRAWIO"
run_as 'php occ app:install drawio'
run_as 'php occ app:update drawio'
run_as 'php occ app:enable drawio'
echo
echo "== TASKS"
run_as 'php occ app:install tasks'
run_as 'php occ app:update tasks'
run_as 'php occ app:enable tasks'
echo
echo "== FILES EXTERNAL"
run_as 'php occ app:install files_external'
run_as 'php occ app:update files_external'
run_as 'php occ app:enable files_external'
echo
echo "== FILES MINDMAP"
run_as 'php occ app:install files_mindmap'
run_as 'php occ app:update files_mindmap'
run_as 'php occ app:enable files_mindmap'
echo
echo "== USER CAS"
cp -rf /envole/app/user_cas /var/www/html/custom_apps
run_as 'php occ config:app:set user_cas cas_server_hostname --value=${CAS_HOST} -q'
run_as 'php occ config:app:set user_cas cas_server_path --value=/${CAS_PATH} -q'
run_as 'php occ config:app:set user_cas cas_server_port --value=${CAS_PORT} -q'
run_as 'php occ config:app:set user_cas cas_use_proxy --value=0 -q'
run_as 'php occ config:app:set user_cas cas_server_version --value=2.0 -q'
run_as 'php occ config:app:set user_cas cas_force_login --value=1 -q'
run_as 'php occ config:app:set user_cas cas_disable_logout --value=0 -q'
run_as 'php occ app:enable user_cas'
echo
echo "== USER LDAP"
run_as 'php occ app:install user_ldap'
run_as 'php occ app:update user_ldap'
run_as 'php occ app:enable user_ldap'
echo
echo