diff options
author | John Klug <john.klug@multitech.com> | 2019-12-04 14:13:30 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2019-12-04 14:13:30 -0600 |
commit | 76b5dfb8142e7c8afde7c3664a6dfc755bae3484 (patch) | |
tree | e2a9cbac5ec596913424022f06243af9e93fcb80 /etc/init.d/commissioning | |
parent | 3422816ad067fa6156d56332c98ceeb2c3ec1996 (diff) | |
download | commissioning-76b5dfb8142e7c8afde7c3664a6dfc755bae3484.tar.gz commissioning-76b5dfb8142e7c8afde7c3664a6dfc755bae3484.tar.bz2 commissioning-76b5dfb8142e7c8afde7c3664a6dfc755bae3484.zip |
Change commissioning to commission in most cases
Diffstat (limited to 'etc/init.d/commissioning')
-rwxr-xr-x | etc/init.d/commissioning | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/etc/init.d/commissioning b/etc/init.d/commissioning deleted file mode 100755 index 82bda67..0000000 --- a/etc/init.d/commissioning +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -DAEMON=/usr/sbin/lighttpd -DAEMONNAME="lighttpd" -NAME=commissioning -DESC="Lighttpd Web Server" -OPTS="-f /etc/lighttpd-commission.conf" -PIDFILE=/var/run/lighttpd-commission.pid -CONF_DIR=/var/config -ENABLED=yes - -[ -f "/etc/default/${NAME}" ] && . "/etc/default/${NAME}" - -PASSWORDS=$(passwd -Sa | egrep '^[^[:space:]]+[[:space:]]P[[:space:]]' | wc -l) -if (($PASSWORDS == 0)) ; then - # No password, so indicate commissioning mode - # php-fpm-commision will be turned on as well - rm -f /etc/default/$NAME - ENABLED="yes" -fi - -[ -f "/etc/default/no-${NAME}" ] && . "/etc/default/no-${NAME}" - -if [ ! -f $CONF_DIR/server.pem ]; then - echo "Generating server cert" - openssl req \ - -x509 -nodes -days 3650 \ - -subj '/C=US/ST=Minnesota/L=Minneapolis/CN=mlinux.example.com' \ - -newkey rsa:2048 -keyout $CONF_DIR/server.pem -out $CONF_DIR/server.pem -fi - -case "$1" in - start) - if [ "$ENABLED" != "yes" ]; then - echo "$NAME: disabled in /etc/default" - exit - fi - echo -n "Starting $DESC: " - start-stop-daemon --start -x "$DAEMON" -- $OPTS - echo "$NAME." - ;; - stop) - echo -n "Stopping $DESC: " - start-stop-daemon --stop -p ${PIDFILE} -x "$DAEMON" - echo "$NAME." - ;; - reload) - echo -n "Reloading $DESC: " - set -x - pkill -HUP -F ${PIDFILE} "$DAEMONNAME" - echo "$NAME." - ;; - restart|force-reload) - echo -n "Restarting $DESC: " - start-stop-daemon --stop -p ${PIDFILE} -x "$DAEMON" - sleep 1 - start-stop-daemon --start -x "$DAEMON" -- $OPTS - echo "$NAME." - ;; - *) - N=/etc/init.d/$NAME - echo "Usage: $N {start|stop|restart|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 |