mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
account for different paths for the systemd service files in later versions.
This commit is contained in:
parent
0280cde59a
commit
4eabf0aeb6
1 changed files with 7 additions and 1 deletions
|
@ -4791,10 +4791,16 @@ install_centos_git_post() {
|
|||
[ $fname = "minion" ] && [ "$_INSTALL_MINION" -eq $BS_FALSE ] && continue
|
||||
[ $fname = "syndic" ] && [ "$_INSTALL_SYNDIC" -eq $BS_FALSE ] && continue
|
||||
|
||||
# Account for new path for services files in later releases
|
||||
if [ -f "${_SALT_GIT_CHECKOUT_DIR}/pkg/common/salt-${fname}.service" ]; then
|
||||
_SERVICE_FILE="${_SALT_GIT_CHECKOUT_DIR}/pkg/common/salt-${fname}.service"
|
||||
else
|
||||
_SERVICE_FILE="${_SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}.service"
|
||||
fi
|
||||
if [ -f /bin/systemctl ]; then
|
||||
if [ ! -f "/usr/lib/systemd/system/salt-${fname}.service" ] || \
|
||||
{ [ -f "/usr/lib/systemd/system/salt-${fname}.service" ] && [ "$_FORCE_OVERWRITE" -eq $BS_TRUE ]; }; then
|
||||
__copyfile "${_SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-${fname}.service" /usr/lib/systemd/system
|
||||
__copyfile "${_SERVICE_FILE}" /usr/lib/systemd/system
|
||||
fi
|
||||
|
||||
SYSTEMD_RELOAD=$BS_TRUE
|
||||
|
|
Loading…
Add table
Reference in a new issue