This commit is contained in:
cutemeli
2025-12-22 10:35:30 +00:00
parent 0bfc6c8425
commit 5ce7ca2c5d
38927 changed files with 0 additions and 4594700 deletions

View File

@@ -1,38 +0,0 @@
#!/bin/bash -e
### Copyright 1999-2023. Plesk International GmbH. All rights reserved.
# pm_Hook_ApiCli doesn't support short options, this wrapper emulates old behavior
OPTS=()
IS_VALUE_EXPECTED=
for opt in "$@"; do
if [ -n "$IS_VALUE_EXPECTED" ]; then
OPTS+=("$opt")
IS_VALUE_EXPECTED=
continue
fi
case "$opt" in
-a) OPTS+=(--apply) ;;
-c) OPTS+=(--confirm) ;;
-d) OPTS+=(--disable) ;;
-e) OPTS+=(--enable) ;;
-r) OPTS+=(--reset) ;;
-s) OPTS+=(--set-rule) ;;
-h) OPTS+=(--help) ;;
-n) OPTS+=(-name); IS_VALUE_EXPECTED="yes" ;;
-p) OPTS+=(-ports); IS_VALUE_EXPECTED="yes" ;;
*)
OPTS+=("$opt")
case "$opt" in
--remove-rules)
IS_VALUE_EXPECTED="yes" ;;
-id|-name|-direction|-action|-ports|-remote-addresses|-from|-to|-ids|-config)
IS_VALUE_EXPECTED="yes" ;;
esac
;;
esac
done
exec /usr/sbin/plesk ext firewall "${OPTS[@]}"