jina verze
This commit is contained in:
@@ -202,23 +202,27 @@ function cmdOpenlitespeed() {
|
||||
;;
|
||||
up)
|
||||
printTitle " $openlitespeedLabel Up $@"
|
||||
cmdOpenlitespeedVhostUp "$@"
|
||||
cmdOpenlitespeedVHostUp "$@"
|
||||
;;
|
||||
down)
|
||||
printTitle " $openlitespeedLabel Down $@"
|
||||
cmdOpenlitespeedVhostDown "$@"
|
||||
cmdOpenlitespeedVHostDown "$@"
|
||||
;;
|
||||
alias)
|
||||
printTitle " $openlitespeedLabel Alias $1"
|
||||
cmdOpenlitespeedVhostAliasSet "$@"
|
||||
cmdOpenlitespeedAliasSet "$@"
|
||||
;;
|
||||
restart)
|
||||
printTitle " $openlitespeedLabel Restart"
|
||||
cmdOpenlitespeedRestart
|
||||
;;
|
||||
php_kill)
|
||||
printTitle " $openlitespeedLabel Kill PHP $@"
|
||||
cmdOpenlitespeedPhpKill "$@"
|
||||
restart_php)
|
||||
printTitle " $openlitespeedLabel Restart PHP"
|
||||
cmdOpenlitespeedPhpRestart
|
||||
;;
|
||||
kill_php)
|
||||
printTitle " $openlitespeedLabel Kill PHP"
|
||||
cmdOpenlitespeedPhpKill
|
||||
;;
|
||||
white_list)
|
||||
printTitle " $openlitespeedLabel White list update"
|
||||
@@ -276,13 +280,22 @@ function cmdPostfix() {
|
||||
printTitle " $postfixLabel Info"
|
||||
cmdPostfixInfo
|
||||
;;
|
||||
status)
|
||||
printTitle " $postfixLabel Status"
|
||||
cmdPostfixMtaDnsCheck
|
||||
list)
|
||||
if [[ -z "$1" ]]; then
|
||||
printInfo " $postfixLabel List all"
|
||||
else
|
||||
printInfo " $postfixLabel List $action"
|
||||
fi
|
||||
cmdPostfixList "$@"
|
||||
;;
|
||||
user)
|
||||
printTitle " $postfixLabel User list"
|
||||
cmdPostfixUser
|
||||
domain)
|
||||
printInfo " $postfixLabel Domain add"
|
||||
postfixDomainAdd "$@"
|
||||
postfixPostmapRebuild
|
||||
;;
|
||||
alias)
|
||||
printInfo " $postfixLabel Set alias for domain"
|
||||
cmdPostfixVirtualAliasSetEx "$@"
|
||||
;;
|
||||
dkim)
|
||||
printInfo " $postfixLabel DKIM record for DNS (autocreate)"
|
||||
@@ -544,51 +557,21 @@ function cmdCron() {
|
||||
}
|
||||
|
||||
function cmdBackup() {
|
||||
local action="${1:-}"
|
||||
shift || true
|
||||
|
||||
case "$action" in
|
||||
run)
|
||||
printTitle " $systemLabel Backup of target"
|
||||
cmdBackupRun "$@"
|
||||
;;
|
||||
list)
|
||||
printTitle " $systemLabel List of backups on local storage"
|
||||
cmdBackupList
|
||||
;;
|
||||
size)
|
||||
printTitle " $systemLabel List of Backup Sizes"
|
||||
cmdBackupSize
|
||||
;;
|
||||
# remove)
|
||||
# printTitle " $backupLabel Remove of backups on local storage"
|
||||
# cmdStorageBackupRemove
|
||||
# ;;
|
||||
*)
|
||||
printTitle " $systemLabel Backup"
|
||||
printRow
|
||||
printWarning "Unsupported or empty command: $action"
|
||||
cmdHelpBackup
|
||||
;;
|
||||
esac
|
||||
if [[ -n "$1" ]]; then
|
||||
cmdBackupRun "$@"
|
||||
else
|
||||
printDanger "$backupLabel Empty command"
|
||||
cmdHelpBackup
|
||||
fi
|
||||
}
|
||||
|
||||
function cmdRestore() {
|
||||
local action="${1:-}"
|
||||
shift || true
|
||||
|
||||
case "$action" in
|
||||
run)
|
||||
printTitle " $restoreLabel Backup of target"
|
||||
restoreRun "$@"
|
||||
;;
|
||||
*)
|
||||
printTitle " $restoreLabel"
|
||||
printRow
|
||||
printWarning "Unsupported or empty command: $action"
|
||||
cmdHelpRestore
|
||||
;;
|
||||
esac
|
||||
if [[ -n "$1" ]]; then
|
||||
restoreRun "$@"
|
||||
else
|
||||
printDanger "$restoreLabel Empty command"
|
||||
cmdHelpRestore
|
||||
fi
|
||||
}
|
||||
|
||||
function cmdStorage() {
|
||||
@@ -604,10 +587,6 @@ function cmdStorage() {
|
||||
printTitle " $systemLabel Comparison table"
|
||||
cmdStorageBackupCompare
|
||||
;;
|
||||
size)
|
||||
printTitle " $systemLabel List of Backup Sizes on external storage"
|
||||
cmdStorageBackupSize
|
||||
;;
|
||||
sync)
|
||||
printTitle " $systemLabel Synchronization with external storage"
|
||||
cmdStorageBackupSync "$@"
|
||||
@@ -625,12 +604,6 @@ function cmdStorage() {
|
||||
esac
|
||||
}
|
||||
|
||||
# Dispatches a named script sub-command and redirects output to a timestamped log file.
|
||||
# $1 (option): script name (backup, mariadb-dump, worker-observer, metric-kube, metric-sites, diag-report-ai-short, diag-report-ai-full).
|
||||
function cmdScript() {
|
||||
cmdScriptRun "$@"
|
||||
}
|
||||
|
||||
function cmdInstall() {
|
||||
printTitle " $ks3Label Full install"
|
||||
if cmdRouterConfirm "Are you sure you want to$fontRed INSTALL$fontReset $fontBlue FULL infrastrutute$fontReset?"; then
|
||||
@@ -677,8 +650,8 @@ function cmdMalware() {
|
||||
printTitle " Malware user list"
|
||||
cmdMalwareUserList
|
||||
;;
|
||||
plugin)
|
||||
printTitle " Malware plugin list"
|
||||
muplugin)
|
||||
printTitle " Malware MU plugin list"
|
||||
cmdMalwareMuPluginList
|
||||
;;
|
||||
file)
|
||||
@@ -701,30 +674,42 @@ function cmdRouter() {
|
||||
printHeader
|
||||
|
||||
case "$action" in
|
||||
-k|--k3s) cmdK3s "$@" ;;
|
||||
-m|--mariadb) cmdMariadb "$@" ;;
|
||||
-r|--redis) cmdRedis "$@" ;;
|
||||
-o|--ols) cmdOpenlitespeed "$@" ;;
|
||||
-p|--postfix) cmdPostfix "$@" ;;
|
||||
-w|--worker) cmdWorker "$@" ;;
|
||||
-s|--site) cmdSite "$@" ;;
|
||||
--metric) cmdMetric "$@" ;;
|
||||
--wp) cmdWordpress "$@" ;;
|
||||
--sftp) cmdSftp "$@" ;;
|
||||
--cron) cmdCron "$@" ;;
|
||||
--shell) cmdShell "$@" ;;
|
||||
--log) cmdLog "$@" ;;
|
||||
--describe) cmdDescribe "$@" ;;
|
||||
--delete) cmdDelete "$@" ;;
|
||||
--backup) cmdBackup "$@" ;;
|
||||
--restore) cmdRestore "$@" ;;
|
||||
--storage) cmdStorage "$@" ;;
|
||||
--script) cmdScript "$@" ;;
|
||||
--install) cmdInstall "$@" ;;
|
||||
--test) cmdTest "$@" ;;
|
||||
--malware) cmdMalware "$@" ;;
|
||||
--help) cmdHelp "$@" ;;
|
||||
dev) appDev "$@" ;;
|
||||
-k|--k3s) cmdK3s "$@" ;;
|
||||
-m|--mariadb) cmdMariadb "$@" ;;
|
||||
-r|--redis) cmdRedis "$@" ;;
|
||||
-o|--ols) cmdOpenlitespeed "$@" ;;
|
||||
-p|--postfix) cmdPostfix "$@" ;;
|
||||
-w|--worker) cmdWorker "$@" ;;
|
||||
-s|--site) cmdSite "$@" ;;
|
||||
--metric) cmdMetric "$@" ;;
|
||||
--wp) cmdWordpress "$@" ;;
|
||||
--sftp) cmdSftp "$@" ;;
|
||||
--cron) cmdCron "$@" ;;
|
||||
--shell)
|
||||
printTitle " Shell $@"
|
||||
cmdShell "$@"
|
||||
;;
|
||||
--log)
|
||||
printTitle " Log $@"
|
||||
cmdLog "$@"
|
||||
;;
|
||||
--describe)
|
||||
printTitle " Describe $@"
|
||||
cmdDescribe "$@"
|
||||
;;
|
||||
--delete)
|
||||
printTitle " Delete $@ $fontRed[DANGER]$fontReset"
|
||||
cmdDelete "$@"
|
||||
;;
|
||||
-b|--backup) cmdBackup "$@" ;;
|
||||
--restore) cmdRestore "$@" ;;
|
||||
--storage) cmdStorage "$@" ;;
|
||||
--script) cmdScript "$@" ;;
|
||||
--install) cmdInstall "$@" ;;
|
||||
--test) cmdTest "$@" ;;
|
||||
--malware) cmdMalware "$@" ;;
|
||||
--help) cmdHelp "$@" ;;
|
||||
dev) appDev "$@" ;;
|
||||
esac
|
||||
|
||||
local status=$?
|
||||
|
||||
Reference in New Issue
Block a user