to avoid confusion with builtin /sbin/reload
}
# Regenerate configuration files
}
# Regenerate configuration files
+function plc_reload () {
force=$1
# Regenerate the main configuration file from default values
force=$1
# Regenerate the main configuration file from default values
#
# Source function library and configuration
#
# Source function library and configuration
+# plc_reload is defined here
. /etc/plc.d/functions
# Verbosity
. /etc/plc.d/functions
# Verbosity
shift 1
if [ -z "$1" ] ; then
# Start or stop everything. Regenerate configuration first.
shift 1
if [ -z "$1" ] ; then
# Start or stop everything. Regenerate configuration first.
else
# Start or stop a particular step
steps=("$@")
else
# Start or stop a particular step
steps=("$@")
if [ -x /etc/plc.d/$step ] ; then
/etc/plc.d/$step start
# Steps may alter the configuration, may need to regenerate
if [ -x /etc/plc.d/$step ] ; then
/etc/plc.d/$step start
# Steps may alter the configuration, may need to regenerate
else
echo "PLC: $step: unrecognized step" >&4
exit 1
else
echo "PLC: $step: unrecognized step" >&4
exit 1
if [ -x /etc/plc.d/$step ] ; then
/etc/plc.d/$step stop
# Steps may alter the configuration, may need to regenerate
if [ -x /etc/plc.d/$step ] ; then
/etc/plc.d/$step stop
# Steps may alter the configuration, may need to regenerate
else
echo "PLC: $step: unrecognized step" >&4
exit 1
else
echo "PLC: $step: unrecognized step" >&4
exit 1