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

@@ -51,7 +51,8 @@ step_2() {
exe su ${toolUser} -c "psql -c \"GRANT ALL PRIVILEGES ON DATABASE \"${postgresDb}\" to ${postgresUser};\""
}
step_4_info() { echoinfoArgs "[DATABASE]"; echo "Drop a postgres database"; }
step_4_info() { echo "Drop a postgres database"; }
step_4_options() { echo "[DATABASE]"; }
step_4_alias() { echo "dropdb"; }
step_4() {
shift
@@ -64,7 +65,8 @@ step_4() {
exe su ${toolUser} -c "psql -c \"DROP DATABASE ${dbname};\""
}
step_6_info() { echoinfoArgs "[DATABASE]"; echo "Size of a postgres database"; }
step_6_info() { echo "Size of a postgres database"; }
step_6_options() { echo "[DATABASE]"; }
step_6_alias() { echo "sizedb"; }
step_6() {
shift
@@ -84,7 +86,8 @@ step_8() {
exe su ${toolUser} -c "psql -c '\l'"
}
step_10_info() { echoinfoArgs "[DATABASE]"; echo "List all tables of a postgres database"; }
step_10_info() { echo "List all tables of a postgres database"; }
step_10_options() { echo "[DATABASE]"; }
step_10_alias() { echo "listtables"; }
step_10() {
shift
@@ -97,7 +100,8 @@ step_10() {
exe su ${toolUser} -c "psql -d $dbname -c \"\\dt\""
}
step_20_info() { echoinfoArgs "[DATABASE]"; echo "Backup ${toolName} database"; }
step_20_info() { echo "Backup ${toolName} database"; }
step_20_options() { echo "[DATABASE]"; }
step_20_alias() { echo "backupdb"; }
step_20() {
shift
@@ -137,9 +141,9 @@ step_22() {
step_24_info() {
local DELYEAR=$(($(date +%Y)-2))
echoinfoArgs "[DATABASE]"
echo "Clean all ${DELYEAR} backups of a database";
}
step_24_options() { echo "[DATABASE]"; }
step_24_alias() { echo "backupclean"; }
step_24() {
shift