Add crond to supervisor

This commit is contained in:
Carlos Álvaro
2018-12-29 10:58:14 +01:00
parent 1b02e23102
commit 3d12fad813

View File

@@ -84,13 +84,13 @@ sed -i "s|^su root syslog$|su root root|" /etc/logrotate.conf
# Configure supervisor # Configure supervisor
echo "Configuring supervisor ..." echo "Configuring supervisor ..."
# configure supervisord to start unicorn # configure supervisord to start salt-master
cat > /etc/supervisor/conf.d/salt-master.conf <<EOF cat > /etc/supervisor/conf.d/salt-master.conf <<EOF
[program:salt-master] [program:salt-master]
priority=5 priority=5
directory=${SALT_HOME} directory=${SALT_HOME}
environment=HOME=${SALT_HOME} environment=HOME=${SALT_HOME}
command=salt-master command=/usr/bin/salt-master
user=${SALT_USER} user=${SALT_USER}
autostart=true autostart=true
autorestart=true autorestart=true
@@ -98,3 +98,16 @@ stopsignal=QUIT
stdout_logfile=${SALT_LOGS_DIR}/supervisor/%(program_name)s.log stdout_logfile=${SALT_LOGS_DIR}/supervisor/%(program_name)s.log
stderr_logfile=${SALT_LOGS_DIR}/supervisor/%(program_name)s.log stderr_logfile=${SALT_LOGS_DIR}/supervisor/%(program_name)s.log
EOF EOF
# configure supervisord to start crond
cat > /etc/supervisor/conf.d/cron.conf <<EOF
[program:cron]
priority=20
directory=/tmp
command=/usr/sbin/cron -f
user=root
autostart=true
autorestart=true
stdout_logfile=${SALT_LOGS_DIR}/supervisor/%(program_name)s.log
stderr_logfile=${SALT_LOGS_DIR}/supervisor/%(program_name)s.log
EOF