Fix typo's and parsing of RESLT

This commit is contained in:
David Murphy 2024-05-10 09:35:40 -06:00 committed by Daniel Wozniak
parent fc428ef22f
commit b44bd4be78
4 changed files with 13 additions and 6 deletions

View file

@ -1,3 +1,5 @@
#!/bin/sh -x
. /usr/share/debconf/confmodule
echo "DGM salt-api.postinst dollar $@"
@ -16,11 +18,12 @@ case "$1" in
db_get salt-api/active
RESLT=$(echo "$RET" | cut -d ' ' -f 1)
if [ "$RESLT" != 10 ]; then
if [ "$RESLT" == "active" ]; then
if [ "$RESLT" = "active" ]; then
systemctl restart salt-api
fi
db_get salt-api/enabled
if [ "$RESLT" == "disabled" ]; then
RESLT=$(echo "$RET" | cut -d ' ' -f 1)
if [ "$RESLT" = "disabled" ]; then
systemctl disable salt-api
else
systemctl enable salt-api

View file

@ -1,3 +1,5 @@
#!/bin/sh -x
. /usr/share/debconf/confmodule
echo "DGM salt-cloud.postinst dollar $@"

View file

@ -22,11 +22,12 @@ case "$1" in
db_get salt-master/active
RESLT=$(echo "$RET" | cut -d ' ' -f 1)
if [ "$RESLT" != 10 ]; then
if [ "$RESLT" == "active" ]; then
if [ "$RESLT" = "active" ]; then
systemctl restart salt-master
fi
db_get salt-master/enabled
if [ "$RESLT" == "disabled" ]; then
RESLT=$(echo "$RET" | cut -d ' ' -f 1)
if [ "$RESLT" = "disabled" ]; then
systemctl disable salt-master
else
systemctl enable salt-master

View file

@ -22,11 +22,12 @@ case "$1" in
db_get salt-minion/active
RESLT=$(echo "$RET" | cut -d ' ' -f 1)
if [ "$RESLT" != 10 ]; then
if [ "$RESLT" == "active" ]; then
if [ "$RESLT" = "active" ]; then
systemctl restart salt-minion
fi
db_get salt-minion/enabled
if [ "$RESLT" == "disabled" ]; then
RESLT=$(echo "$RET" | cut -d ' ' -f 1)
if [ "$RESLT" = "disabled" ]; then
systemctl disable salt-minion
else
systemctl enable salt-minion