summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2019-12-06 18:43:40 -0600
committerJohn Klug <john.klug@multitech.com>2019-12-06 18:43:40 -0600
commit80eaa16354f31eba6e684018d9ca85e08ff2f817 (patch)
tree156bc810613136f088a3a2748b290bd2f21b2427 /etc
parent9d870ac83b48cb6187fdc784c2e18179f906759a (diff)
downloadcommissioning-80eaa16354f31eba6e684018d9ca85e08ff2f817.tar.gz
commissioning-80eaa16354f31eba6e684018d9ca85e08ff2f817.tar.bz2
commissioning-80eaa16354f31eba6e684018d9ca85e08ff2f817.zip
Set paths consistantly
Diffstat (limited to 'etc')
-rwxr-xr-xetc/init.d/commission4
-rwxr-xr-xetc/init.d/commission-php-fpm5
2 files changed, 4 insertions, 5 deletions
diff --git a/etc/init.d/commission b/etc/init.d/commission
index 5241176..c65fbaf 100755
--- a/etc/init.d/commission
+++ b/etc/init.d/commission
@@ -4,7 +4,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/sbin/lighttpd
DAEMONNAME="lighttpd"
NAME=commission
-DESC="Lighttpd Web Server"
+DESC="MT lighttpd Commissioning Server"
OPTS="-f /etc/lighttpd-commission.conf"
PIDFILE=/var/run/lighttpd-commission.pid
CONF_DIR=/var/config
@@ -17,6 +17,7 @@ if (($PASSWORDS == 0)) ; then
# No password, so indicate commissioning mode
# php-fpm-commision will be turned on as well
rm -f "/run/mt-commission"
+ echo 'ENABLED="yes"' >"/run/mt-commission"
else
ENABLED="no"
echo 'ENABLED="no"' >"/run/mt-commission"
@@ -53,7 +54,6 @@ case "$1" in
;;
reload)
echo -n "Reloading $DESC: "
- set -x
pkill -HUP -F ${PIDFILE} "$DAEMONNAME"
echo "$NAME."
;;
diff --git a/etc/init.d/commission-php-fpm b/etc/init.d/commission-php-fpm
index 2f18fbc..e5e1077 100755
--- a/etc/init.d/commission-php-fpm
+++ b/etc/init.d/commission-php-fpm
@@ -10,6 +10,7 @@
# Description: starts the PHP FastCGI Process Manager daemon
### END INIT INFO
+DESC="MT php commissioning server "
NAME="php-fpm-commission"
prefix=/usr
exec_prefix=/usr
@@ -22,8 +23,6 @@ php_fpm_PID="/var/run/${NAME}.pid"
php_opts="-R --fpm-config $php_fpm_CONF --pid $php_fpm_PID"
ENABLED=yes
-[ -f "/run/mt-commission" ] && . "/run/mt-commission"
-
wait_for_pid () {
try=0
@@ -55,7 +54,7 @@ wait_for_pid () {
case "$1" in
start)
- [[ -f /etc/default/commission ]] && . /etc/default/commission
+ [ -f "/run/mt-commission" ] && . "/run/mt-commission"
if [[ $ENABLED != "yes" ]]; then
echo "$NAME: disabled in /run/mt-commission"
exit