2017-05-08 17:43:31 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2017-10-05 01:35:43 -05:00
|
|
|
# Remove stale rsyslog PID file if it exists
|
2017-03-29 20:07:25 -05:00
|
|
|
rm -f /var/run/rsyslogd.pid
|
2017-05-08 17:43:31 -05:00
|
|
|
|
2017-10-05 01:35:43 -05:00
|
|
|
# Start rsyslog
|
2017-05-08 17:43:31 -05:00
|
|
|
supervisorctl start rsyslogd
|
2017-03-29 20:07:25 -05:00
|
|
|
|
2018-05-16 16:32:42 -05:00
|
|
|
# If our supervisor config has entries in the "isc-dhcp-relay" group...
|
|
|
|
if [ $(supervisorctl status | grep -c "^isc-dhcp-relay:") -gt 0 ]; then
|
|
|
|
# Wait for all interfaces to come up and be assigned IPv4 addresses before
|
|
|
|
# starting the DHCP relay agent(s). If an interface the relay should listen
|
|
|
|
# on is down, the relay agent will not start. If an interface the relay
|
|
|
|
# should listen on is up but does not have an IP address assigned when the
|
|
|
|
# relay agent starts, it will not listen or send on that interface for the
|
|
|
|
# lifetime of the process.
|
|
|
|
/usr/bin/wait_for_intf.sh
|
2017-03-16 12:40:33 -05:00
|
|
|
|
2018-05-16 16:32:42 -05:00
|
|
|
# Start all DHCP relay agent(s)
|
|
|
|
supervisorctl start isc-dhcp-relay:*
|
|
|
|
fi
|
2020-01-07 19:48:03 -06:00
|
|
|
|
|
|
|
# If our supervisor config has entries in the "dhcpmon" group...
|
|
|
|
if [ $(supervisorctl status | grep -c "^dhcpmon:") -gt 0 ]; then
|
|
|
|
# Start all DHCP Monitor daemon(s)
|
|
|
|
supervisorctl start dhcpmon:*
|
|
|
|
fi
|