Commit 8faacbfb authored by nextime's avatar nextime

Fix watchdog START configuration handling

- Remove set -x tracing from init and watchdog scripts
- Fix wssshd and wssshc watchdogs to accept various START values
- Support yes, YES, Y, 1, true, TRUE as documented in config files
parent c476d907
......@@ -142,9 +142,10 @@ trap cleanup SIGTERM SIGINT
# Main watchdog loop
main() {
# Check if START is enabled
if [ "$START" != "yes" ]; then
log_message "START is not set to 'yes' in /etc/default/wssshd. Exiting."
# Check if START is enabled (accept various forms: yes, YES, Y, 1, true, TRUE)
START_LOWER=$(echo "$START" | tr '[:upper:]' '[:lower:]')
if [ "$START_LOWER" != "yes" ] && [ "$START_LOWER" != "y" ] && [ "$START_LOWER" != "1" ] && [ "$START_LOWER" != "true" ]; then
log_message "START is not set to a valid enabled value in /etc/default/wssshd. Exiting."
exit 0
fi
......
......@@ -142,9 +142,10 @@ trap cleanup SIGTERM SIGINT
# Main watchdog loop
main() {
# Check if START is enabled
if [ "$START" != "yes" ]; then
log_message "START is not set to 'yes' in /etc/default/wssshc. Exiting."
# Check if START is enabled (accept various forms: yes, YES, Y, 1, true, TRUE)
START_LOWER=$(echo "$START" | tr '[:upper:]' '[:lower:]')
if [ "$START_LOWER" != "yes" ] && [ "$START_LOWER" != "y" ] && [ "$START_LOWER" != "1" ] && [ "$START_LOWER" != "true" ]; then
log_message "START is not set to a valid enabled value in /etc/default/wssshc. Exiting."
exit 0
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment