Created
April 22, 2015 00:41
-
-
Save andresvia/13ddbe43d349636dd9e3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
my_vars="MYSQL_SERVER MYSQL_DATABASE MYSQL_USER MYSQL_PASSWORD EXTERNAL_ENV" | |
for var in ${my_vars} | |
do | |
if [ -z "${!var}" ] | |
then | |
echo "No ${var} defined" | |
exit 1 | |
fi | |
val="${!var}" | |
sed -i "s|{${var}}|${val}|g" /etc/zabbix/zabbix_server.conf /usr/local/lib/zabbix/alertscripts/* | |
done | |
# cleaning up "puppet apply" residues | |
rm /var/run/pdagent/pdagentd.pid | |
# these processes daemonize themselves | |
/usr/sbin/zabbix_server | |
su -s /bin/sh -c /usr/share/pdagent/bin/pdagentd.py pdagent | |
# if supervisord is started with exec it will reap any | |
# unknown process | |
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment