1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-20 18:27:23 +01:00

Setup fixes

1. Autodetect encryption-at-rest and run the correct setup in boostrap and /usr/local/bin/mailinabox
2. Fix bug where directories in the local mod folder are improperly executed causing setup to fail
3. Add a remote_nextcloud.sh setup mod cleanup function for cleaner removal of the mod
This commit is contained in:
downtownallday
2022-10-14 09:27:24 -04:00
parent 14a4f34d39
commit e636e63862
5 changed files with 52 additions and 13 deletions

View File

@@ -59,7 +59,7 @@ fi
cat > /usr/local/bin/mailinabox << EOF;
#!/bin/bash
cd $(pwd)
source setup/start.sh
source $(source ehdd/ehdd_funcs.sh; if hdd_exists; then echo 'ehdd/start-encrypted.sh'; else echo 'setup/start.sh'; fi)
EOF
chmod +x /usr/local/bin/mailinabox
@@ -176,10 +176,11 @@ fi
#
if [ -d "${LOCAL_MODS_DIR:-local}" ]; then
for mod in $(ls "${LOCAL_MODS_DIR:-local}" | grep -v '~$'); do
if [ -x ${LOCAL_MODS_DIR:-local}/$mod ]; then
mod_path="${LOCAL_MODS_DIR:-local}/$mod"
if [ -f "$mod_path" -a -x "$mod_path" ]; then
echo ""
echo "Running mod: ${LOCAL_MODS_DIR:-local}/$mod"
${LOCAL_MODS_DIR:-local}/$mod
echo "Running mod: $mod_path"
"$mod_path"
fi
done
fi