Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit de109f8c authored by Nicolas Gelot's avatar Nicolas Gelot
Browse files

feat: add starting script

parent 4ca76e10
Loading
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
#!/bin/sh
set -eu

DATA_DIR="${NEXTCLOUD_DATA_DIR:-/var/www/html/data}"
TARGET_FILE="${DATA_DIR}/appdata_snappymail/_data_/_default_/admin_password.txt"

if [ ! -d "${DATA_DIR}" ]; then
    echo "[before-starting] Nextcloud data directory \"${DATA_DIR}\" is missing; skipping SnappyMail admin password cleanup."
    return 0 2>/dev/null || exit 0
fi

if [ -f "${TARGET_FILE}" ]; then
    rm -f "${TARGET_FILE}"
    echo "[before-starting] Removed SnappyMail admin password file at ${TARGET_FILE}."
fi