net/stunnel: do always stop/start on config change
authorFlorian Eckert <fe@dev.tdt.de>
Tue, 23 Jan 2018 10:12:16 +0000 (11:12 +0100)
committerFlorian Eckert <fe@dev.tdt.de>
Tue, 23 Jan 2018 10:53:47 +0000 (11:53 +0100)
Do not send a SIGHUP on reload configuration let procd restart the
service with stop/start. This is saver.

Add uci generated stunnel file to procd "file" attribute to
reload/restart the stunnel service.

Signed-off-by: Florian Eckert <fe@dev.tdt.de>
net/stunnel/files/stunnel.init

index 2c7d0effd16e54ec700ec2eed3d736cdd8bbe767..79e391e78b65d9fc40516ba9b8892d3eeff21dce 100644 (file)
@@ -156,12 +156,6 @@ process_config() {
        config_foreach service_section service
 }
 
-reload_service() {
-       process_config
-       # SIGHUP is used by stunnel to do init.d reload
-       procd_send_signal stunnel
-}
-
 service_triggers() {
        procd_add_reload_trigger "stunnel"
 }
@@ -175,5 +169,6 @@ start_service() {
 
        # set auto respawn behavior
        procd_set_param respawn
+       procd_set_param file "$CONF_FILE"
        procd_close_instance
 }