Loading deployment/salt/base/docker-compose.sls +0 −7 Original line number Diff line number Diff line Loading @@ -36,13 +36,6 @@ cron-renew-ssl-certs: - special: '@daily' - identifier: 'refresh-tls-certs' cron-check-updates: cron.present: - name: bash /mnt/repo-base/scripts/check-update.sh - user: root - special: '@daily' - identifier: 'check-updates' cron-sync-emails: cron.present: - name: bash /mnt/repo-base/scripts/sync-emails.sh Loading scripts/check-update.shdeleted 100755 → 0 +0 −28 Original line number Diff line number Diff line #!/bin/bash set -e source /mnt/repo-base/scripts/base.sh KNOWN_VERSION_FILE="/mnt/repo-base/config/latest-known-version" # TODO: delete this once config folder is included in the repo mkdir /mnt/repo-base/config/ || true touch $KNOWN_VERSION_FILE CURRENT_VERSION_DATE=$(git show -s --format=%ci HEAD) git fetch --tags LATEST_TAG=$(git tag --sort=creatordate | tail -n 1) LATEST_VERSION_DATE=$(git show -s --format=%ci "$LATEST_TAG") if [[ "$LATEST_VERSION_DATE" > "$CURRENT_VERSION_DATE" ]] then echo "New version $LATEST_TAG is available!" if [ "$LATEST_TAG" != "$(cat $KNOWN_VERSION_FILE)" ] then echo "$LATEST_TAG" > "$KNOWN_VERSION_FILE" cat "templates/mail/update-notification.txt" | \ sed "s/@@@DOMAIN@@@/$DOMAIN/g" | \ docker-compose exec -T eelomailserver sendmail -f "drive@$DOMAIN" -t "$ALT_EMAIL" fi else echo "No update available" fi scripts/init-repo.sh +0 −6 Original line number Diff line number Diff line Loading @@ -176,10 +176,6 @@ cat /mnt/repo-base/templates/nextcloud/config.php | sed "s/@@@DOMAIN@@@/$DOMAIN/ sed "s/@@@DRIVE_SMTP_PASSWORD@@@/$DRIVE_SMTP_PASSWORD/g" > "/mnt/repo-base/volumes/nextcloud/config/config.php" chown www-data:www-data "/mnt/repo-base/volumes/nextcloud/" -R # Login to /e/ registry | not necessary when going public echo "Please login with your gitlab.e.foundation username and password" docker login registry.gitlab.e.foundation:5000 docker-compose up -d echo -e "\nHack: restart everything to ensure that database and nextcloud are initialized" Loading @@ -190,7 +186,6 @@ touch /mnt/repo-base/volumes/accounts/auth.file.done ACCOUNTS_UID=$(docker-compose exec --user www-data welcome id -u | tr -d '\r') chown "$ACCOUNTS_UID:$ACCOUNTS_UID" /mnt/repo-base/volumes/accounts/auth.file.done printf "$(date): Waiting for Nextcloud to finish installation" # sleep for 300 seconds for i in {0..300}; do Loading @@ -198,5 +193,4 @@ for i in {0..300}; do printf "." done bash scripts/postinstall.sh scripts/postinstall.sh +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ docker-compose exec -T --user www-data nextcloud php /var/www/html/occ app:insta docker-compose exec -T --user www-data nextcloud php /var/www/html/occ config:app:set rainloop rainloop-autologin --value 1 echo "Installing Nextcloud theme" wget "https://gitlab.e.foundation/api/v4/projects/315/repository/archive.tar.gz?private_token=qV5kExhz6mDY5QET8z56" -O "/tmp/nextcloud-theme.tar.gz" wget "https://gitlab.e.foundation/api/v4/projects/315/repository/archive.tar.gz" -O "/tmp/nextcloud-theme.tar.gz" tar -xzf "/tmp/nextcloud-theme.tar.gz" -C "volumes/nextcloud/html/themes/" --strip-components=1 chown www-data:www-data "volumes/nextcloud/html/themes/" -R rm "/tmp/nextcloud-theme.tar.gz" Loading Loading
deployment/salt/base/docker-compose.sls +0 −7 Original line number Diff line number Diff line Loading @@ -36,13 +36,6 @@ cron-renew-ssl-certs: - special: '@daily' - identifier: 'refresh-tls-certs' cron-check-updates: cron.present: - name: bash /mnt/repo-base/scripts/check-update.sh - user: root - special: '@daily' - identifier: 'check-updates' cron-sync-emails: cron.present: - name: bash /mnt/repo-base/scripts/sync-emails.sh Loading
scripts/check-update.shdeleted 100755 → 0 +0 −28 Original line number Diff line number Diff line #!/bin/bash set -e source /mnt/repo-base/scripts/base.sh KNOWN_VERSION_FILE="/mnt/repo-base/config/latest-known-version" # TODO: delete this once config folder is included in the repo mkdir /mnt/repo-base/config/ || true touch $KNOWN_VERSION_FILE CURRENT_VERSION_DATE=$(git show -s --format=%ci HEAD) git fetch --tags LATEST_TAG=$(git tag --sort=creatordate | tail -n 1) LATEST_VERSION_DATE=$(git show -s --format=%ci "$LATEST_TAG") if [[ "$LATEST_VERSION_DATE" > "$CURRENT_VERSION_DATE" ]] then echo "New version $LATEST_TAG is available!" if [ "$LATEST_TAG" != "$(cat $KNOWN_VERSION_FILE)" ] then echo "$LATEST_TAG" > "$KNOWN_VERSION_FILE" cat "templates/mail/update-notification.txt" | \ sed "s/@@@DOMAIN@@@/$DOMAIN/g" | \ docker-compose exec -T eelomailserver sendmail -f "drive@$DOMAIN" -t "$ALT_EMAIL" fi else echo "No update available" fi
scripts/init-repo.sh +0 −6 Original line number Diff line number Diff line Loading @@ -176,10 +176,6 @@ cat /mnt/repo-base/templates/nextcloud/config.php | sed "s/@@@DOMAIN@@@/$DOMAIN/ sed "s/@@@DRIVE_SMTP_PASSWORD@@@/$DRIVE_SMTP_PASSWORD/g" > "/mnt/repo-base/volumes/nextcloud/config/config.php" chown www-data:www-data "/mnt/repo-base/volumes/nextcloud/" -R # Login to /e/ registry | not necessary when going public echo "Please login with your gitlab.e.foundation username and password" docker login registry.gitlab.e.foundation:5000 docker-compose up -d echo -e "\nHack: restart everything to ensure that database and nextcloud are initialized" Loading @@ -190,7 +186,6 @@ touch /mnt/repo-base/volumes/accounts/auth.file.done ACCOUNTS_UID=$(docker-compose exec --user www-data welcome id -u | tr -d '\r') chown "$ACCOUNTS_UID:$ACCOUNTS_UID" /mnt/repo-base/volumes/accounts/auth.file.done printf "$(date): Waiting for Nextcloud to finish installation" # sleep for 300 seconds for i in {0..300}; do Loading @@ -198,5 +193,4 @@ for i in {0..300}; do printf "." done bash scripts/postinstall.sh
scripts/postinstall.sh +1 −1 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ docker-compose exec -T --user www-data nextcloud php /var/www/html/occ app:insta docker-compose exec -T --user www-data nextcloud php /var/www/html/occ config:app:set rainloop rainloop-autologin --value 1 echo "Installing Nextcloud theme" wget "https://gitlab.e.foundation/api/v4/projects/315/repository/archive.tar.gz?private_token=qV5kExhz6mDY5QET8z56" -O "/tmp/nextcloud-theme.tar.gz" wget "https://gitlab.e.foundation/api/v4/projects/315/repository/archive.tar.gz" -O "/tmp/nextcloud-theme.tar.gz" tar -xzf "/tmp/nextcloud-theme.tar.gz" -C "volumes/nextcloud/html/themes/" --strip-components=1 chown www-data:www-data "volumes/nextcloud/html/themes/" -R rm "/tmp/nextcloud-theme.tar.gz" Loading