chore: rename plugin to mx autologin

This commit is contained in:
Marek Miklewicz
2026-06-30 20:33:54 +02:00
parent 4a1c9d0db4
commit bb6a01fdca
17 changed files with 55 additions and 41 deletions
+3 -3
View File
@@ -1,8 +1,8 @@
#!/bin/sh
set -eu
BASE_DIR="/usr/local/hitme_plugins/mail-login"
PLUGIN_DIR="/usr/local/directadmin/plugins/mail-login"
BASE_DIR="/usr/local/hitme_plugins/mx_autologin"
PLUGIN_DIR="/usr/local/directadmin/plugins/mx_autologin"
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"
@@ -14,4 +14,4 @@ fi
touch "$BASE_DIR/logs/audit.log"
chmod 600 "$BASE_DIR/logs/audit.log"
echo "mail-login installed; configuration is read from $PLUGIN_DIR/plugin-settings.conf"
echo "MX-Autologin installed; configuration is read from $PLUGIN_DIR/plugin-settings.conf"
+4 -4
View File
@@ -1,11 +1,11 @@
#!/bin/sh
set -eu
KEY_DIR="${MAIL_LOGIN_KEY_DIR:-/usr/local/hitme_plugins/mail-login/secrets}"
KEY_DIR="${MAIL_LOGIN_KEY_DIR:-/usr/local/hitme_plugins/mx_autologin/secrets}"
KEY_NAME="${MAIL_LOGIN_KEY_NAME:-mx1_ed25519}"
KEY_PATH="$KEY_DIR/$KEY_NAME"
MX_MODE="${MX_LOGIN_MODE:-1}"
SETTINGS_FILE="${MAIL_LOGIN_SETTINGS_FILE:-/usr/local/directadmin/plugins/mail-login/plugin-settings.conf}"
SETTINGS_FILE="${MAIL_LOGIN_SETTINGS_FILE:-/usr/local/directadmin/plugins/mx_autologin/plugin-settings.conf}"
HELPER_COMMAND="${MAIL_LOGIN_HELPER_COMMAND:-/usr/local/hitme_plugins/mail-login-helper/bin/create-login-url}"
config_value() {
@@ -154,7 +154,7 @@ chmod 700 "$KEY_DIR"
if [ ! -f "$KEY_PATH" ]; then
umask 077
ssh-keygen -q -t ed25519 -a 100 -N "" -f "$KEY_PATH" -C "KLUCZ PLUGINU mail-autologin DLA SERWERA $SERVER_LABEL"
ssh-keygen -q -t ed25519 -a 100 -N "" -f "$KEY_PATH" -C "KLUCZ PLUGINU MX-Autologin DLA SERWERA $SERVER_LABEL"
fi
if [ ! -f "$KEY_PATH.pub" ]; then
@@ -177,7 +177,7 @@ else
AUTH_OPTIONS="$BASE_OPTIONS"
fi
COMMENT="KLUCZ PLUGINU mail-autologin DLA SERWERA $SERVER_LABEL"
COMMENT="KLUCZ PLUGINU MX-Autologin DLA SERWERA $SERVER_LABEL"
cat <<EOF
Private key:
+2 -2
View File
@@ -11,7 +11,7 @@ ROOT_DIR="$(cd .. && pwd)"
ARCHIVE_DIR="$ROOT_DIR/archives/$VERSION"
mkdir -p "$ARCHIVE_DIR"
tar -czf "$ARCHIVE_DIR/mail-login.tar.gz" \
tar -czf "$ARCHIVE_DIR/mx_autologin.tar.gz" \
--exclude='./.git' \
--exclude='./tests' \
--exclude='./scripts/package.sh' \
@@ -22,4 +22,4 @@ tar -czf "$ARCHIVE_DIR/mail-login.tar.gz" \
--exclude='./.DS_Store' \
.
echo "$ARCHIVE_DIR/mail-login.tar.gz"
echo "$ARCHIVE_DIR/mx_autologin.tar.gz"
+3 -3
View File
@@ -1,11 +1,11 @@
#!/bin/sh
set -eu
BASE_DIR="/usr/local/hitme_plugins/mail-login"
BASE_DIR="/usr/local/hitme_plugins/mx_autologin"
if [ "${PURGE_MAIL_LOGIN_DATA:-0}" = "1" ]; then
rm -rf "$BASE_DIR"
echo "mail-login data purged"
echo "MX-Autologin data purged"
else
echo "mail-login uninstalled; external data preserved at $BASE_DIR"
echo "MX-Autologin uninstalled; external data preserved at $BASE_DIR"
fi
+3 -3
View File
@@ -1,8 +1,8 @@
#!/bin/sh
set -eu
BASE_DIR="/usr/local/hitme_plugins/mail-login"
PLUGIN_DIR="/usr/local/directadmin/plugins/mail-login"
BASE_DIR="/usr/local/hitme_plugins/mx_autologin"
PLUGIN_DIR="/usr/local/directadmin/plugins/mx_autologin"
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"
@@ -12,4 +12,4 @@ fi
touch "$BASE_DIR/logs/audit.log"
chmod 600 "$BASE_DIR/logs/audit.log"
echo "mail-login updated; configuration is read from $PLUGIN_DIR/plugin-settings.conf"
echo "MX-Autologin updated; configuration is read from $PLUGIN_DIR/plugin-settings.conf"