summaryrefslogtreecommitdiff
path: root/etc/init.d/php-fpm-commission
diff options
context:
space:
mode:
Diffstat (limited to 'etc/init.d/php-fpm-commission')
-rwxr-xr-xetc/init.d/php-fpm-commission11
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