mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
CentOS 7 now uses SystemD instead of SysV
Ensure centos 7 is capable of using systemd for checking if the service is running/restarting
This commit is contained in:
parent
9c77925a95
commit
c9046c06b7
1 changed files with 6 additions and 0 deletions
|
@ -2591,6 +2591,10 @@ install_centos_restart_daemons() {
|
|||
# Still in SysV init!?
|
||||
/etc/init.d/salt-$fname stop > /dev/null 2>&1
|
||||
/etc/init.d/salt-$fname start
|
||||
elif [ -f /usr/bin/systemctl ]; then
|
||||
# CentOS 7 uses systemd
|
||||
/usr/bin/systemctl stop salt-$fname > /dev/null 2>&1
|
||||
/usr/bin/systemctl start salt-$fname.service
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
@ -2620,6 +2624,8 @@ install_centos_check_services() {
|
|||
__check_services_upstart salt-$fname || return 1
|
||||
elif [ -f /etc/init.d/salt-$fname ]; then
|
||||
__check_services_sysvinit salt-$fname || return 1
|
||||
elif [ -f /usr/bin/systemctl ]; then
|
||||
__check_services_systemd salt-$fname || return 1
|
||||
fi
|
||||
done
|
||||
return 0
|
||||
|
|
Loading…
Add table
Reference in a new issue