Blame
Date:
Mon Jan 23 05:00:25 2023 UTC
Message:
Daily backup
01
2023-01-22
jrmu
version=pmwiki-2.2.130 ordered=1 urlencoded=1
02
2023-01-22
jrmu
agent=Mozilla/5.0 (X11; CrOS x86_64 13904.97.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.167 Safari/537.36
03
2023-01-22
jrmu
author=xfnw
04
2023-01-22
jrmu
charset=UTF-8
05
2023-01-22
jrmu
csum=fix title formatting
06
2023-01-22
jrmu
ctime=1622817059
07
2023-01-22
jrmu
host=149.19.43.33
08
2023-01-22
jrmu
name=Rcd.Configure
09
2023-01-22
jrmu
rev=4
10
2023-01-22
jrmu
targets=Hopm.Install
11
2023-01-22
jrmu
text=(:title Daemon control and mangement system (rcctl):)%0aThe rcctl utility can enable or disable a base system service or a base system or package daemon in rc.conf.local or display its configuration and status. For a daemon, it can also change the command line arguments, the user to run as, the rc.d action timeout or call its rc.d daemon control script.%0a%0aThe /etc/rc.d directory contains shell scripts to start, stop, and reconfigure daemon programs (“services”).%0a%0a**Services installed from packages may be started at boot time in the order specified by the pkg_scripts variable from rc.conf the order will be reversed during shutdown. Services comprising OpenBSD base are started by rc.**%0a%0aThe options are as follows:%0a%0a-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.%0a%0a-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.%0a%0aEach such script responds to the following actions:%0a%0astart...........-Start the service, if not already running.\\%0astop...........-Stop the service.\\%0areload.......-Tell the daemon to reload its configuration.\\%0arestart.......-Perform a stop, then a start.\\%0acheck.........-Return 0 if the daemon is running or 1 if it is not.\\%0a%0a%0a%0a!! Run a process as system daemon%0a * This topic shows how to run a simple process as priviledged system daemon which enable it be started/stopped/enabled by rcctl daemon control system%0a * Here we'll use hopm process to explain how to launch it into system daemon.%0a * For this to work , we'll first install hopm as user hopm, group hopm as usual refer more of it [[Hopm.Install|hopm]]%0a * Then we'll create a rc.d script in /etc/rc.d dir by name of "hopm"%0a * Then We'll lauch the process by calling "rcctl start hopm" with root priviledge%0a%0a!! Creating rc.d file for process (hopm)%0aNow give following commands -%0a[@%0adoas cd /etc/rc.d%0adoas nano hopm%0a@]%0aIn nano editor add the following code daemon should be set equal to "/path/to/daemon"%0a[@%0a#!/bin/ksh%0adaemon="/home/hopm/hopm/bin/hopm"%0a. /etc/rc.d/rc.subr%0arc_cmd $1%0a@]%0asave the file and run the following command.%0a[@%0a$ doas rcctl start hopm%0a$ doas rcctl enable hopm%0a@]%0a%0aFirst command will start the processs(hopm) with root priviledge system daemon and second command will enable it to be restarted automatically at booting up.%0a
12
2023-01-22
jrmu
time=1644943570
13
2023-01-22
jrmu
title=Daemon control and mangement system (rcctl)
14
2023-01-22
jrmu
author:1644943570=xfnw
15
2023-01-22
jrmu
csum:1644943570=fix title formatting
16
2023-01-22
jrmu
diff:1644943570:1644934647:=1c1%0a%3c (:title Daemon control and mangement system (rcctl):)%0a---%0a> (:Daemon control and mangement system (rcctl):)%0a
17
2023-01-22
jrmu
host:1644943570=149.19.43.33
18
2023-01-22
jrmu
author:1644934647=Naglfar
19
2023-01-22
jrmu
csum:1644934647=Update url
20
2023-01-22
jrmu
diff:1644934647:1628956892:=27c27%0a%3c * For this to work , we'll first install hopm as user hopm, group hopm as usual refer more of it [[Hopm.Install|hopm]]%0a---%0a> * For this to work , we'll first install hopm as user hopm, group hopm as usual refer more of it [[irc/hopm|hopm]]%0a
21
2023-01-22
jrmu
host:1644934647=92.191.225.58
22
2023-01-22
jrmu
author:1628956892=mkf
23
2023-01-22
jrmu
diff:1628956892:1622817059:minor=1c1%0a%3c (:Daemon control and mangement system (rcctl):)%0a---%0a> ===== Daemon control and mangement system (rcctl) =====%0a24c24%0a%3c !! Run a process as system daemon%0a---%0a> ===== Run a process as system daemon =====%0a27c27%0a%3c * For this to work , we'll first install hopm as user hopm, group hopm as usual refer more of it [[irc/hopm|hopm]]%0a---%0a> * For this to work , we'll first install hopm as user hopm, group hopm as usual refer more of it here [[https://ircnow.org/kb/doku.php?id=openbsd:irc:hopm]]%0a30,31c30%0a%3c %0a%3c !! Creating rc.d file for process (hopm)%0a---%0a> ===== Creating rc.d file for process (hopm) =====%0a33c32%0a%3c [@%0a---%0a> %3ccode>%0a36c35%0a%3c @]%0a---%0a> %3c/code>%0a38c37%0a%3c [@%0a---%0a> %3ccode>%0a43c42%0a%3c @]%0a---%0a> %3c/code>%0a45,49c44,47%0a%3c [@%0a%3c $ doas rcctl start hopm%0a%3c $ doas rcctl enable hopm%0a%3c @]%0a%3c %0a---%0a> %3ccode>%0a> doas rcctl start hopm%0a> doas rcctl enable hopm%0a> %3c/code>%0a50a49,50%0a> %0a> * 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.%0a
24
2023-01-22
jrmu
host:1628956892=2.178.173.183
25
2023-01-22
jrmu
author:1622817059=jrmu
26
2023-01-22
jrmu
diff:1622817059:1622817059:=1,50d0%0a%3c ===== Daemon control and mangement system (rcctl) =====%0a%3c The rcctl utility can enable or disable a base system service or a base system or package daemon in rc.conf.local or display its configuration and status. For a daemon, it can also change the command line arguments, the user to run as, the rc.d action timeout or call its rc.d daemon control script.%0a%3c %0a%3c The /etc/rc.d directory contains shell scripts to start, stop, and reconfigure daemon programs (“services”).%0a%3c %0a%3c **Services installed from packages may be started at boot time in the order specified by the pkg_scripts variable from rc.conf the order will be reversed during shutdown. Services comprising OpenBSD base are started by rc.**%0a%3c %0a%3c The options are as follows:%0a%3c %0a%3c -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.%0a%3c %0a%3c -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.%0a%3c %0a%3c Each such script responds to the following actions:%0a%3c %0a%3c start...........-Start the service, if not already running.\\%0a%3c stop...........-Stop the service.\\%0a%3c reload.......-Tell the daemon to reload its configuration.\\%0a%3c restart.......-Perform a stop, then a start.\\%0a%3c check.........-Return 0 if the daemon is running or 1 if it is not.\\%0a%3c %0a%3c %0a%3c %0a%3c ===== Run a process as system daemon =====%0a%3c * This topic shows how to run a simple process as priviledged system daemon which enable it be started/stopped/enabled by rcctl daemon control system%0a%3c * Here we'll use hopm process to explain how to launch it into system daemon.%0a%3c * For this to work , we'll first install hopm as user hopm, group hopm as usual refer more of it here [[https://ircnow.org/kb/doku.php?id=openbsd:irc:hopm]]%0a%3c * Then we'll create a rc.d script in /etc/rc.d dir by name of "hopm"%0a%3c * Then We'll lauch the process by calling "rcctl start hopm" with root priviledge%0a%3c ===== Creating rc.d file for process (hopm) =====%0a%3c Now give following commands -%0a%3c %3ccode>%0a%3c doas cd /etc/rc.d%0a%3c doas nano hopm%0a%3c %3c/code>%0a%3c In nano editor add the following code daemon should be set equal to "/path/to/daemon"%0a%3c %3ccode>%0a%3c #!/bin/ksh%0a%3c daemon="/home/hopm/hopm/bin/hopm"%0a%3c . /etc/rc.d/rc.subr%0a%3c rc_cmd $1%0a%3c %3c/code>%0a%3c save the file and run the following command.%0a%3c %3ccode>%0a%3c doas rcctl start hopm%0a%3c doas rcctl enable hopm%0a%3c %3c/code>%0a%3c First command will start the processs(hopm) with root priviledge system daemon and second command will enable it to be restarted automatically at booting up.%0a%3c %0a%3c * 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.%0a
27
2023-01-22
jrmu
host:1622817059=38.81.163.143
IRCNow