mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix sanity checks and defaults file sourcing
This commit is contained in:
parent
8376fd5284
commit
186c929c51
3 changed files with 36 additions and 12 deletions
|
@ -35,15 +35,23 @@ else
|
|||
. /etc/rc.d/init.d/functions
|
||||
fi
|
||||
|
||||
# Default values, can be overridden below in /etc/default/salt
|
||||
SALTMASTER=/usr/bin/salt-master
|
||||
PYTHON=/usr/bin/python
|
||||
|
||||
if [ -f /etc/default/salt ]; then
|
||||
. /etc/default/salt
|
||||
else
|
||||
SALTMASTER=/usr/bin/salt-master
|
||||
PYTHON=/usr/bin/python
|
||||
fi
|
||||
|
||||
# Sanity checks.
|
||||
[ -x $SALTMASTER ] || exit 0
|
||||
if [ ! -x "$SALTMASTER" ]; then
|
||||
echo "Unable to execute $SALTMASTER!"
|
||||
exit 2
|
||||
fi
|
||||
if [ ! -x "$PYTHON" ]; then
|
||||
echo "$PYTHON does not exist or is not executable"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
SERVICE=salt-master
|
||||
PROCESS=salt-master
|
||||
|
|
|
@ -36,15 +36,23 @@ else
|
|||
. /etc/rc.d/init.d/functions
|
||||
fi
|
||||
|
||||
# Default values, can be overridden below in /etc/default/salt
|
||||
SALTMINION=/usr/bin/salt-minion
|
||||
PYTHON=/usr/bin/python
|
||||
|
||||
if [ -f /etc/default/salt ]; then
|
||||
. /etc/default/salt
|
||||
else
|
||||
SALTMINION=/usr/bin/salt-minion
|
||||
PYTHON=/usr/bin/python
|
||||
fi
|
||||
|
||||
# Sanity checks.
|
||||
[ -x $SALTMINION ] || exit 0
|
||||
if [ ! -x "$SALTMINION" ]; then
|
||||
echo "Unable to execute $SALTMINION!"
|
||||
exit 2
|
||||
fi
|
||||
if [ ! -x "$PYTHON" ]; then
|
||||
echo "$PYTHON does not exist or is not executable"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
SERVICE=salt-minion
|
||||
PROCESS=salt-minion
|
||||
|
|
|
@ -36,15 +36,23 @@ else
|
|||
. /etc/rc.d/init.d/functions
|
||||
fi
|
||||
|
||||
# Default values, can be overridden below in /etc/default/salt
|
||||
SALTSYNDIC=/usr/bin/salt-syndic
|
||||
PYTHON=/usr/bin/python
|
||||
|
||||
if [ -f /etc/default/salt ]; then
|
||||
. /etc/default/salt
|
||||
else
|
||||
SALTSYNDIC=/usr/bin/salt-syndic
|
||||
PYTHON=/usr/bin/python
|
||||
fi
|
||||
|
||||
# Sanity checks.
|
||||
[ -x $SALTSYNDIC ] || exit 0
|
||||
if [ ! -x "$SALTSYNDIC" ]; then
|
||||
echo "Unable to execute $SALTSYNDIC!"
|
||||
exit 2
|
||||
fi
|
||||
if [ ! -x "$PYTHON" ]; then
|
||||
echo "$PYTHON does not exist or is not executable"
|
||||
exit 2
|
||||
fi
|
||||
|
||||
SERVICE=salt-syndic
|
||||
PROCESS=salt-syndic
|
||||
|
|
Loading…
Add table
Reference in a new issue