IRCNow

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
openbsd:rc.d [2020/06/12 02:00]
drquest [Run a process (here sample process HOPM) as system daemon]
openbsd:rc.d [2020/06/12 02:21] (current)
drquest [Daemon control and mangement system (rcctl)]
Line 8: Line 8:
 The options are as follows: The options are as follows:
  
--d.........Setting this option will print the function names as they are called and prevent the rc.subr framework from redirecting stdout and stderr to /dev/null. This is used to allow debugging of failed actions.+-d........Setting this option will print the function names as they are called and prevent the rc.subr framework from redirecting stdout and stderr to /dev/null. This is used to allow debugging of failed actions.
  
 -f.........This option only affects the start action. It will forcibly start the daemon whatever value daemon_flags is set to. If daemon_flags is set to “NO”, execution will continue with the script'​s own defaults unless other flags are specified. -f.........This option only affects the start action. It will forcibly start the daemon whatever value daemon_flags is set to. If daemon_flags is set to “NO”, execution will continue with the script'​s own defaults unless other flags are specified.
Line 28: Line 28:
   * Then we'll create a rc.d script in /etc/rc.d dir by name of "​hopm"​   * Then we'll create a rc.d script in /etc/rc.d dir by name of "​hopm"​
   * Then We'll lauch the process by calling "rcctl start hopm" with root priviledge   * Then We'll lauch the process by calling "rcctl start hopm" with root priviledge
-===== Creating rc.d file for hopm =====+===== Creating rc.d file for process (hopm=====
 Now give following commands - Now give following commands -
 <​code>​ <​code>​
Line 34: Line 34:
 doas  nano hopm doas  nano hopm
 </​code>​ </​code>​
-In nano editor add the following code+In nano editor add the following code daemon should be set equal to "/​path/​to/​daemon"​
 <​code>​ <​code>​
 #!/bin/ksh #!/bin/ksh
Line 46: Line 46:
 doas rcctl enable hopm doas rcctl enable hopm
 </​code>​ </​code>​
-First command will start the hopm with root priviledge system daemon and second command +First command will start the processs(hopmwith root priviledge system daemon and second command will enable it to be restarted automatically at booting up.
-will enable it to be restarted automatically at booting up.+
  
   * Syntax errors when hopm is running in foreground. This is either the result of missing brackets where needed in config file, or that the file has DOS encodings. See [[https://​github.com/​ircd-hybrid/​hopm/​issues/​22#​issuecomment-301276082]] here. The missing brackets where it was needed may come from the previous section, compared to the line/s where it is indicated by hopm when executed.   * Syntax errors when hopm is running in foreground. This is either the result of missing brackets where needed in config file, or that the file has DOS encodings. See [[https://​github.com/​ircd-hybrid/​hopm/​issues/​22#​issuecomment-301276082]] here. The missing brackets where it was needed may come from the previous section, compared to the line/s where it is indicated by hopm when executed.