Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/update.sh b/update.sh
index 3a8bc178..87011a1a 100755
--- a/update.sh
+++ b/update.sh
@@ -129,6 +129,19 @@ inotifywait --monitor --event create --event delete --format '%f %e' /media/ | \
done
EOF
chmod +x /usr/local/etc/nc-automount-links-mon
+
+ # install and configure email if not present
+ type sendmail &>/dev/null || {
+ echo "Installing and configuring email"
+ apt-get update
+ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends postfix
+ OCC=/var/www/nextcloud/occ
+ sudo -u www-data php $OCC config:system:set mail_smtpmode --value="php"
+ sudo -u www-data php $OCC config:system:set mail_smtpauthtype --value="LOGIN"
+ sudo -u www-data php $OCC config:system:set mail_from_address --value="admin"
+ sudo -u www-data php $OCC config:system:set mail_domain --value="ownyourbits.com"
+}
+
# restart PHP to get updates in the ncp-web
# FIXME: php doesn't come up if run from ncp-web
#(