diff options
author | John Klug <john.klug@multitech.com> | 2019-12-02 19:02:07 -0600 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2019-12-02 19:02:07 -0600 |
commit | c296a35072f3fb630f48aac225e34f35440c1bcb (patch) | |
tree | c68d22ddc5a933488d272eab739cc992292ac1f2 /etc/init.d/php-fpm-commission | |
parent | f230e0b1d9e027e6f98f218efbb74946b7a94b92 (diff) | |
download | commissioning-c296a35072f3fb630f48aac225e34f35440c1bcb.tar.gz commissioning-c296a35072f3fb630f48aac225e34f35440c1bcb.tar.bz2 commissioning-c296a35072f3fb630f48aac225e34f35440c1bcb.zip |
Allow some time after submit to shut down lighttpd
Diffstat (limited to 'etc/init.d/php-fpm-commission')
-rwxr-xr-x | etc/init.d/php-fpm-commission | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/etc/init.d/php-fpm-commission b/etc/init.d/php-fpm-commission index 37cff70..d61584c 100755 --- a/etc/init.d/php-fpm-commission +++ b/etc/init.d/php-fpm-commission @@ -20,8 +20,17 @@ php_fpm_PID="/var/run/${NAME}.pid" php_opts="-R --fpm-config $php_fpm_CONF --pid $php_fpm_PID" -ENABLED="yes" +ENABLED=yes +[ -f "/etc/default/commissioning" ] && . "/etc/config/commisioning" + +# /etc/default/no-${NAME} should point at /etc/default/.no-${NAME} +# and contain ENABLED="no". +# This will prevent commissioning on a factory reset +# but not on an image update for tighter security. +# If the device is to have no password at all, this file and +# link must be created, and ENABLED must be set to "no" +[ -f "/etc/default/no-${NAME}" ] && . "/etc/config/no-${NAME}" wait_for_pid () { try=0 |