Directly call reload() instead of relying on initscript reload.
authorMarco Yuen <marcoy@cs.princeton.edu>
Wed, 29 Feb 2012 20:27:17 +0000 (15:27 -0500)
committerMarco Yuen <marcoy@cs.princeton.edu>
Wed, 29 Feb 2012 20:27:17 +0000 (15:27 -0500)
plc.d/api
plc.d/postgresql

index 09acc8d..1cdd9ff 100755 (executable)
--- a/plc.d/api
+++ b/plc.d/api
@@ -31,7 +31,8 @@ case "$1" in
        if [ -z "$PLC_API_MAINTENANCE_PASSWORD" ] ; then
            PLC_API_MAINTENANCE_PASSWORD=$(uuidgen)
            plc-config --category=plc_api --variable=maintenance_password --value="$PLC_API_MAINTENANCE_PASSWORD" --save=$local_config $local_config
-           service plc reload
+        #service plc reload
+        reload force
        fi
 
        # Make sure that all PLC servers are allowed to access the API
@@ -47,7 +48,8 @@ case "$1" in
         ) | sort -u))
        PLC_API_MAINTENANCE_SOURCES=${PLC_API_MAINTENANCE_SOURCES[*]}
        plc-config --category=plc_api --variable=maintenance_sources --value="$PLC_API_MAINTENANCE_SOURCES" --save=$local_config $local_config
-       service plc reload
+    #service plc reload
+    reload force
 
        result "$MESSAGE"
        ;;
index c3c37b1..989cd7e 100755 (executable)
@@ -152,7 +152,8 @@ case "$1" in
        if [ -z "$PLC_DB_PASSWORD" ] ; then
            PLC_DB_PASSWORD=$(uuidgen)
            plc-config --category=plc_db --variable=password --value="$PLC_DB_PASSWORD" --save=$local_config $local_config
-           service plc reload
+        #service plc reload
+        reload force
        fi
        if ! psql -U $PLC_DB_USER -c "" template1 >/dev/null 2>&1 ; then
            psql -U postgres -c "CREATE USER $PLC_DB_USER PASSWORD '$PLC_DB_PASSWORD'" template1