mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
Install fixes
This commit is contained in:
parent
6319f9c981
commit
0b2eb2db8f
3 changed files with 18 additions and 15 deletions
|
@ -14,15 +14,16 @@ case "$1" in
|
|||
fi
|
||||
if command -v systemctl; then
|
||||
db_get salt-api/active
|
||||
if [ "$RET" != 10 ]; then
|
||||
if [ "$RET" == "active" ]; then
|
||||
RESLT=$(echo "$RET" | cut -d ' ' -f 1)
|
||||
if [ "$RESLT" != 10 ]; then
|
||||
if [ "$RESLT" == "active" ]; then
|
||||
systemctl restart salt-api
|
||||
fi
|
||||
db_get salt-api/enabled
|
||||
if [ "$RET" == "enabled" ]; then
|
||||
systemctl enable salt-api
|
||||
else
|
||||
if [ "$RESLT" == "disabled" ]; then
|
||||
systemctl disable salt-api
|
||||
else
|
||||
systemctl enable salt-api
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -20,15 +20,16 @@ case "$1" in
|
|||
fi
|
||||
if command -v systemctl; then
|
||||
db_get salt-master/active
|
||||
if [ "$RET" != 10 ]; then
|
||||
if [ "$RET" == "active" ]; then
|
||||
RESLT=$(echo "$RET" | cut -d ' ' -f 1)
|
||||
if [ "$RESLT" != 10 ]; then
|
||||
if [ "$RESLT" == "active" ]; then
|
||||
systemctl restart salt-master
|
||||
fi
|
||||
db_get salt-master/enabled
|
||||
if [ "$RET" == "enabled" ]; then
|
||||
systemctl enable salt-master
|
||||
if [ "$RESLT" == "disabled" ]; then
|
||||
systemctl disable salt-api
|
||||
else
|
||||
systemctl disable salt-master
|
||||
systemctl enable salt-api
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -20,15 +20,16 @@ case "$1" in
|
|||
fi
|
||||
if command -v systemctl; then
|
||||
db_get salt-minion/active
|
||||
if [ "$RET" != 10 ]; then
|
||||
if [ "$RET" == "active" ]; then
|
||||
RESLT=$(echo "$RET" | cut -d ' ' -f 1)
|
||||
if [ "$RESLT" != 10 ]; then
|
||||
if [ "$RESLT" == "active" ]; then
|
||||
systemctl restart salt-minion
|
||||
fi
|
||||
db_get salt-minion/enabled
|
||||
if [ "$RET" == "enabled" ]; then
|
||||
systemctl enable salt-minion
|
||||
if [ "$RESLT" == "disabled" ]; then
|
||||
systemctl disable salt-api
|
||||
else
|
||||
systemctl disable salt-minion
|
||||
systemctl enable salt-api
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Reference in a new issue