nextcloud/rootfs/etc/cont-init.d/00-nextcloud

77 lines
3.5 KiB
Plaintext
Raw Normal View History

2018-01-30 07:36:21 +00:00
#!/usr/bin/with-contenv sh
set -ex
2019-03-16 11:41:58 +00:00
cd /var/lib/nextcloud
chmod +x ./occ
2018-01-30 07:55:27 +00:00
2018-01-30 10:11:38 +00:00
if [ ! -f /var/lib/nextcloud/data/.installed ]; then
2018-01-30 07:36:21 +00:00
s6-setuidgid nginx ./occ maintenance:install \
--database=pgsql \
2019-03-16 11:41:58 +00:00
--database-host="$DB_HOST" \
--database-name="$DB_NAME" \
--database-user="$DB_USER" \
--database-pass="$DB_PASSWORD" \
2021-08-22 15:40:33 +00:00
--database-port="$DB_PORT" \
2019-03-16 11:41:58 +00:00
--admin-user="$ADMIN_USER" \
--admin-pass="$ADMIN_PASSWORD" \
2018-01-30 07:36:21 +00:00
--data-dir=/var/lib/nextcloud/data/ \
--no-interaction
2018-01-30 10:11:38 +00:00
touch /var/lib/nextcloud/data/.installed
2018-01-30 07:54:21 +00:00
fi
2019-03-16 11:41:58 +00:00
s6-setuidgid nginx ./occ config:app:set --value cron core backgroundjobs_mode
s6-setuidgid nginx ./occ app:enable files_sharing
2020-03-12 09:45:09 +00:00
s6-setuidgid nginx ./occ app:enable text
2019-03-16 11:41:58 +00:00
s6-setuidgid nginx ./occ app:enable files_pdfviewer
s6-setuidgid nginx ./occ app:enable files_videoplayer
s6-setuidgid nginx ./occ app:enable theming
2020-03-12 09:58:46 +00:00
s6-setuidgid nginx ./occ app:enable photos
2019-03-16 11:41:58 +00:00
s6-setuidgid nginx ./occ app:enable twofactor_totp
s6-setuidgid nginx ./occ app:enable twofactor_backupcodes
s6-setuidgid nginx ./occ app:enable twofactor_u2f
s6-setuidgid nginx ./occ app:enable polls
2019-06-20 13:33:01 +00:00
s6-setuidgid nginx ./occ app:enable calendar
s6-setuidgid nginx ./occ app:enable contacts
s6-setuidgid nginx ./occ app:enable news
s6-setuidgid nginx ./occ app:enable tasks
s6-setuidgid nginx ./occ app:enable notes
2021-08-22 18:06:11 +00:00
#s6-setuidgid nginx ./occ app:enable mail
2021-08-22 14:44:51 +00:00
s6-setuidgid nginx ./occ app:enable sociallogin
2020-10-03 11:39:13 +00:00
s6-setuidgid nginx ./occ app:enable integration_mastodon
2020-10-03 11:50:30 +00:00
s6-setuidgid nginx ./occ app:enable integration_github
2020-10-03 11:39:13 +00:00
s6-setuidgid nginx ./occ app:enable integration_gitlab
2019-03-16 11:41:58 +00:00
s6-setuidgid nginx ./occ app:disable activity
s6-setuidgid nginx ./occ app:disable comments
s6-setuidgid nginx ./occ app:disable files_trashbin
s6-setuidgid nginx ./occ app:disable firstrunwizard
s6-setuidgid nginx ./occ app:disable logreader
2019-03-17 16:51:01 +00:00
s6-setuidgid nginx ./occ app:disable nextcloud_announcements
2019-03-16 11:41:58 +00:00
s6-setuidgid nginx ./occ app:disable password_policy
2019-03-17 16:51:01 +00:00
s6-setuidgid nginx ./occ app:disable serverinfo
2019-03-16 11:41:58 +00:00
s6-setuidgid nginx ./occ app:disable support
s6-setuidgid nginx ./occ app:disable survey_client
2019-03-17 16:51:01 +00:00
s6-setuidgid nginx ./occ app:disable systemtags
2019-03-16 11:41:58 +00:00
s6-setuidgid nginx ./occ app:disable updatenotification
2019-03-17 17:22:10 +00:00
s6-setuidgid nginx ./occ config:system:set --value '\OC\Memcache\APCu' memcache.local
2018-01-30 07:54:21 +00:00
s6-setuidgid nginx ./occ config:system:set --value "https://$DOMAIN" overwrite.cli.url
2018-01-30 09:15:20 +00:00
s6-setuidgid nginx ./occ config:system:set --value "localhost" trusted_domains 0
s6-setuidgid nginx ./occ config:system:set --value "$DOMAIN" trusted_domains 1
2018-01-30 10:48:45 +00:00
s6-setuidgid nginx ./occ config:system:set --value "syslog" log_type
s6-setuidgid nginx ./occ config:system:set --value "" logfile
s6-setuidgid nginx ./occ config:system:set --value "3" loglevel
2018-01-30 07:54:21 +00:00
s6-setuidgid nginx ./occ config:system:set --value "smtp" mail_smtpmode
s6-setuidgid nginx ./occ config:system:set --value "${MAIL_SMTP_AUTH_TYPE:-PLAIN}" mail_smtpauthtype
s6-setuidgid nginx ./occ config:system:set --value "$MAIL_FROM" mail_from_address
s6-setuidgid nginx ./occ config:system:set --value "$MAIL_DOMAIN" mail_domain
s6-setuidgid nginx ./occ config:system:set --value "${MAIL_SMTP_SECURITY:-tls}" mail_smtpsecure
s6-setuidgid nginx ./occ config:system:set --value "${MAIL_SMTP_AUTH:-1}" mail_smtpauth
s6-setuidgid nginx ./occ config:system:set --value "$MAIL_SMTP_HOST" mail_smtphost
s6-setuidgid nginx ./occ config:system:set --value "${MAIL_SMTP_PORT:-587}" mail_smtpport
s6-setuidgid nginx ./occ config:system:set --value "$MAIL_SMTP_NAME" mail_smtpname
s6-setuidgid nginx ./occ config:system:set --value "$MAIL_SMTP_PASSWORD" mail_smtppassword
2018-01-30 09:15:20 +00:00