Files
2026-06-30 20:40:41 +02:00

16 lines
554 B
Bash
Executable File

#!/bin/sh
set -eu
BASE_DIR="/usr/local/hitme_plugins/mxautologin"
PLUGIN_DIR="/usr/local/directadmin/plugins/mxautologin"
mkdir -p "$BASE_DIR/secrets" "$BASE_DIR/logs" "$BASE_DIR/state/rate-limit"
chmod 700 "$BASE_DIR/secrets" "$BASE_DIR/logs" "$BASE_DIR/state" "$BASE_DIR/state/rate-limit"
if [ -f "$PLUGIN_DIR/plugin-settings.conf" ]; then
chmod 600 "$PLUGIN_DIR/plugin-settings.conf"
fi
touch "$BASE_DIR/logs/audit.log"
chmod 600 "$BASE_DIR/logs/audit.log"
echo "MX-Autologin updated; configuration is read from $PLUGIN_DIR/plugin-settings.conf"