Sync global-autoresponder current state
This commit is contained in:
+2
-7
@@ -5,20 +5,15 @@ BASE_DIR="/usr/local/hitme_plugins/global-autoresponders"
|
||||
PLUGIN_DIR="/usr/local/directadmin/plugins/global-autoresponder"
|
||||
CRON_FILE="/etc/cron.d/global-autoresponder"
|
||||
|
||||
mkdir -p "$BASE_DIR/config/users" "$BASE_DIR/data/users" "$BASE_DIR/state/replies" "$BASE_DIR/logs"
|
||||
mkdir -p "$BASE_DIR/config/users" "$BASE_DIR/data/users" "$BASE_DIR/logs"
|
||||
chmod 700 "$BASE_DIR/config" "$BASE_DIR/logs"
|
||||
chmod 711 "$BASE_DIR/data" "$BASE_DIR/state"
|
||||
chmod 711 "$BASE_DIR/data"
|
||||
|
||||
if [ ! -f "$BASE_DIR/config/plugin-settings.conf" ]; then
|
||||
cp "$PLUGIN_DIR/plugin-settings.conf" "$BASE_DIR/config/plugin-settings.conf"
|
||||
chmod 600 "$BASE_DIR/config/plugin-settings.conf"
|
||||
fi
|
||||
|
||||
if [ ! -f "$BASE_DIR/config/backend-state.json" ]; then
|
||||
printf '%s\n' '{"active_backend":"da","migration_status":"complete"}' > "$BASE_DIR/config/backend-state.json"
|
||||
chmod 600 "$BASE_DIR/config/backend-state.json"
|
||||
fi
|
||||
|
||||
touch "$BASE_DIR/logs/audit.log"
|
||||
chmod 600 "$BASE_DIR/logs/audit.log"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user