Rework step options handling

This commit is contained in:
2022-12-12 11:16:26 +01:00
parent 44ae559918
commit 1f431daa16
30 changed files with 120 additions and 120 deletions

View File

@@ -138,7 +138,8 @@ fetchmailRsyslogLoc="/etc/rsyslog.d/30-fetchmail.conf"
fetchmailRsyslog="if \$programname == 'fetchmail' or \$programname == 'fetchmail-all' then $fetchmailLogLoc
& stop"
step_18_info() { echoinfoArgs "[NEW VERSION]"; echo "Check for updates"; }
step_18_info() { echo "Check for updates"; }
step_18_options() { echo "[NEW VERSION]"; }
step_18_alias() { echo "updatecheck"; }
step_18() {
shift
@@ -162,7 +163,6 @@ step_18() {
step_20_info() {
echoinfoArgs "[POSTFIXADMIN SRV ROOT]"
echo -n "Create a backup"
if [ $sq_config -ne 0 ] ; then
echo " at $PFA_BACKUP"
@@ -170,6 +170,7 @@ step_20_info() {
echo
fi
}
step_20_options() { echo "[POSTFIXADMIN SRV ROOT]"; }
step_20_alias() { echo "backup"; }
step_20() {
shift
@@ -196,7 +197,6 @@ step_20() {
}
step_22_info() {
echoinfoArgs "[CUSTOM VERSION]"
shift
if contextExe; then
echoinfo -n "Upgrade to version "
@@ -210,6 +210,7 @@ step_22_info() {
echo "Upgrade to latest or a custom version from github"
fi
}
step_22_options() { echo "[CUSTOM VERSION]"; }
step_22_alias() { echo "upgrade"; }
step_22() {
shift # don't need step number
@@ -309,10 +310,10 @@ step_23() {
}
step_100_info() {
echoinfoArgs "[OPTIONS]"
echo "Execute $toolName client script"
echoinfo "[OPTIONS] are passed on to $toolName-cli unmodified"
}
step_100_options() { echo "[OPTIONS]"; }
step_100_alias() { echo "cli"; }
step_100() {
shift