mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Fix typo's and parsing of RESLT
This commit is contained in:
parent
fc428ef22f
commit
b44bd4be78
4 changed files with 13 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#!/bin/sh -x
|
||||
|
||||
. /usr/share/debconf/confmodule
|
||||
|
||||
echo "DGM salt-cloud.postinst dollar $@"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue