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" \
|
|
|
|
--database-table-prefix="$DB_TABLE_PREFIX" \
|
|
|
|
--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 user_ldap
|
|
|
|
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
|
|
|
|
s6-setuidgid nginx ./occ app:enable gallery
|
|
|
|
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
|
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
|
|
|
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "$LDAP_BASE_DN" user_ldap ldap_base
|
2018-01-30 07:54:21 +00:00
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "$LDAP_BASE_GROUP_DN" user_ldap ldap_base_groups
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "$LDAP_EMAIL_ATTRIBUTE" user_ldap ldap_email_attr
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "$LDAP_USER_FILTER" user_ldap ldap_userlist_filter
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "$LDAP_LOGIN_FILTER" user_ldap ldap_login_filter
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "$LDAP_TLS" user_ldap ldap_tls
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "$LDAP_HOST" user_ldap ldap_host
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "$LDAP_BIND_USER" user_ldap ldap_dn
|
2018-01-30 09:56:04 +00:00
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "$(php -r 'echo base64_encode(getenv("LDAP_BIND_PASSWORD"));')" user_ldap ldap_agent_password
|
2018-01-30 07:54:21 +00:00
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "$LDAP_GROUP_FILTER" user_ldap ldap_group_filter
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "$LDAP_USER_DISPLAY_NAME" user_ldap ldap_display_name
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "${LDAP_PORT:-389}" user_ldap ldap_port
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "$LDAP_BASE_USER_DN" user_ldap ldap_base_users
|
2018-01-30 09:15:20 +00:00
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "$LDAP_UID_ATTRIBUTE" user_ldap ldap_expert_username_attr
|
2018-01-30 09:32:33 +00:00
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "yes" user_ldap enabled
|
|
|
|
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_backup_host
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_backup_port
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_backup_port
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_backup_port
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_backup_port
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_backup_port
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_user_display_name_2
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_gid_number
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_userfilter_objectclass
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_userfilter_groups
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "authentication" user_ldap types
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "0" user_ldap ldap_user_filter_mode
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "0" user_ldap ldap_group_filter_mode
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_groupfilter_objectclass
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "0" user_ldap ldap_turn_off_cert_check
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "uniqueMember" user_ldap ldap_group_member_assoc_attribute
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "0" user_ldap ldap_login_filter_mode
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "0" user_ldap ldap_loginfilter_email
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "1" user_ldap ldap_loginfilter_username
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "1" user_ldap ldap_loginfilter_attributes
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_quota_attr
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_quota_def
|
2018-02-14 14:18:55 +00:00
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "600" user_ldap ldap_cache_ttl
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_override_main_server
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_attributes_for_user_search
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_attributes_for_group_search
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "0" user_ldap ldap_experienced_admin
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap home_folder_naming_rule
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "0" user_ldap has_memberof_filter_support
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "1" user_ldap use_memberof_to_detect_membership
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_expert_uuid_user_attr
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_expert_uuid_group_attr
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "0" user_ldap last_jpegPhoto_lookup
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "0" user_ldap ldap_nested_groups
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "500" user_ldap ldap_paging_size
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "0" user_ldap ldap_turn_on_pwd_change
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_dynamic_group_member_url
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "" user_ldap ldap_default_ppolicy_dn
|
|
|
|
s6-setuidgid nginx ./occ config:app:set --value "1" user_ldap ldap_configuration_active
|