User Tools

Site Tools


docs:guide-developer:procd-init-scripts

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:guide-developer:procd-init-scripts [2018/06/13 14:18]
aparcar1 add procd_add_interface_trigger
docs:guide-developer:procd-init-scripts [2018/09/27 09:22] (current)
karlp [Debugging] adding INIT_TRACE (new to me)
Line 64: Line 64:
 You can edit as many config files as you like, and then issue reload_config,​ procd will take care of reloading all of them.   Note, no change in the config file, no reload. ​ If you want to explicitly reload, you still need to issue '''/​etc/​init.d/<​yourservice>​ reload'''​ manually. You can edit as many config files as you like, and then issue reload_config,​ procd will take care of reloading all of them.   Note, no change in the config file, no reload. ​ If you want to explicitly reload, you still need to issue '''/​etc/​init.d/<​yourservice>​ reload'''​ manually.
  
-By default, "​reload"​ will cause a stop/start call, _only_ if the md5sum of the final computed command line has changed. ​ (This is in addition to any reload triggers) ​ If your application doesn'​t use args, but has a generated config file, or parses the uci config file directly, you should add that to procd via '''​procd_set_param file /​var/​etc/​your_service.conf'''​ or '''​procd_set_param file /​etc/​config/​yourapp'''​ If you don't have any files or args, but still need to explicitly restart when reload is called, you can hook reload_service as shown below.+By default, "​reload"​ will cause a stop/start call, _only_ if the md5sum of the final computed command line has changed. ​ (This is in addition to any reload triggers) ​ If your application doesn'​t use args, but has a generated config file, or parses the uci config file directly, you should add that to procd via '''​procd_set_param file /​var/​etc/​your_service.conf'''​ or '''​procd_set_param file /​etc/​config/​yourapp'''​ If you don't have any files or args, but still need to explicitly restart when reload is called, you can hook reload_service as shown below.  Note that if your file is not in /​etc/​config,​ that '''​reload_config'''​ won't work, but '''/​etc/​init.d/<​service>​ reload'''​ will still do the right thing.
  
  
Line 112: Line 112:
 ===== Debugging ===== ===== Debugging =====
 Set PROCD_DEBUG=1 to see debugging information when starting or stopping a procd init script. Set PROCD_DEBUG=1 to see debugging information when starting or stopping a procd init script.
 +Also, ''​INIT_TRACE=1 /​etc/​init.d/​mything $action''​ Where $action is start/stop etc.
 ===== Examples ===== ===== Examples =====
  
docs/guide-developer/procd-init-scripts.1528899532.txt.gz · Last modified: 2018/06/13 14:18 by aparcar1