version=pmwiki-2.2.130 ordered=1 urlencoded=1 agent=Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 author=mkf charset=UTF-8 csum= ctime=1627911723 host=198.251.81.133 name=Rcctl.Rcctl rev=3 targets= text=rcctl is a utility to manage @@/etc/rc.conf.local@@, for running, killing and managing system services.%0athankfully since rcctl is part of base system, nothing is needed to install it.%0a%0a%0a!!commands%0a%0a!!!ls%0a%0a@@rcctl ls@@ can used for list-ing kinds of services%0aexamples:%0a%0a[@%0a$ doas rcctl ls failed%0a@]%0a[@%0a$ doas rcctl ls on%0a@]%0a%0a!!!check%0a@@rcctl check@@ can used to check if a service is still running or not.%0afor example:%0a[@%0a$ doas rcctl check vmd%0a@]%0a%0aif vmd is running:%0a[@%0avmd(ok)%0a@]%0a%0aotherwise:%0a[@%0avmd(failed)%0a@]%0a%0a!!!enable%0a@@rcctl enable@@ enables services, making them executed on next boot.%0ait doesn't show anything after running.%0asee start for starting a service without rebooting.%0a[@%0a$ doas rcctl enable xenodm%0a@]%0a%0a!!!disable%0a@@rcctl disable@@ disables services, and don't let them to run on next boot. you might want to stop these as well.%0a[@%0arcctl disable xendom%0a@]%0a%0a!!!start%0a@@rcctl start@@ is for starting services which are allowed to run.%0aif you try to run a disabled service, following will happen:%0a[@%0a$ doas rcctl start sndiod%0a/etc/rc.d/sndiod: need -f to force start since sndiod_flags=NO%0a@]%0a%0ayou can enable it's service, or use @@rcctl start -f@@ to start it without enabling it.%0a%0ain both cases, you will see this:%0a[@%0asndiod(ok)%0a@]%0a%0a!!!stop%0a@@rcctl stop@@ stops running services, if a service is not running or not enabled, it won't say anything.%0a[@ %0a$doas rcctl stop sndiod%0asndiod(ok)%0a@]%0a%0a!!!restart%0a@@rcctl restart@@ it first stop services, then starts them again (thats why it shows two). this is useful for when you have updated configurations. however, you most use reload always. (unless service is stopped or it doesn't support reload)%0a[@%0a$doas rcctl restart smtpd%0asmtpd(ok)%0asmtpd(ok)%0a@]%0a%0a!!!reload%0a@@rcctl reload@@ is used to tell a service to reload it's configuration files. it's useful for places such as an irc server which restarting will cause all users getting disconnected. not all services support this action.%0ait will send a signal to called service in order to reload it:%0a[@%0a$ doas rcctl reload nsd%0ansd(ok)%0a@]%0a%0a!!!flag%0asome deamons ship with custom flags to change their functionality instad of a config file, you can change them with @@flags@@ if they are enabled.%0aapmd is a example of following, you can set @@-H@ to apmd to set maximum perforamce mode on apmd%0a[@%0a$ doas rcctl set apmd flags -H%0a@]%0a%0a!!!get%0ayou can get information from services (no matter if they are running or not)%0ausing @@rcctl get@@:%0a[@%0a$ rcctl get pflogd%0apflogd_class=daemon%0apflogd_flags=%0apflogd_logger=%0apflogd_rtable=0%0apflogd_timeout=30%0apflogd_user=root%0a@] time=1627914973 author:1627914973=mkf diff:1627914973:1627914536:=19d18%0a%3c !!!check%0a36d34%0a%3c !!!enable%0a44d41%0a%3c !!!disable%0a50d46%0a%3c !!!start%0a65d60%0a%3c !!!stop%0a72d66%0a%3c !!!restart%0a79,80d72%0a%3c %0a%3c !!!reload%0a88d79%0a%3c !!!flag%0a93,105d83%0a%3c @]%0a%3c %0a%3c !!!get%0a%3c you can get information from services (no matter if they are running or not)%0a%3c using @@rcctl get@@:%0a%3c [@%0a%3c $ rcctl get pflogd%0a%3c pflogd_class=daemon%0a%3c pflogd_flags=%0a%3c pflogd_logger=%0a%3c pflogd_rtable=0%0a%3c pflogd_timeout=30%0a%3c pflogd_user=root%0a host:1627914973=198.251.81.133 author:1627914536=mkf diff:1627914536:1627911723:=42c42,43%0a%3c @@rcctl disable@@ disables services, and don't let them to run on next boot. you might want to stop these as well.%0a---%0a> @@rcctl start@@ is for starting services which are allowed to run.%0a> if you try to run a disabled service, following will happen:%0a44c45,46%0a%3c rcctl disable xendom%0a---%0a> $ doas rcctl start sndiod%0a> /etc/rc.d/sndiod: need -f to force start since sndiod_flags=NO%0a46,84c48,51%0a%3c %0a%3c @@rcctl start@@ is for starting services which are allowed to run.%0a%3c if you try to run a disabled service, following will happen:%0a%3c [@%0a%3c $ doas rcctl start sndiod%0a%3c /etc/rc.d/sndiod: need -f to force start since sndiod_flags=NO%0a%3c @]%0a%3c %0a%3c you can enable it's service, or use @@rcctl start -f@@ to start it without enabling it.%0a%3c %0a%3c in both cases, you will see this:%0a%3c [@%0a%3c sndiod(ok)%0a%3c @]%0a%3c %0a%3c @@rcctl stop@@ stops running services, if a service is not running or not enabled, it won't say anything.%0a%3c [@ %0a%3c $doas rcctl stop sndiod%0a%3c sndiod(ok)%0a%3c @]%0a%3c %0a%3c @@rcctl restart@@ it first stop services, then starts them again (thats why it shows two). this is useful for when you have updated configurations. however, you most use reload always. (unless service is stopped or it doesn't support reload)%0a%3c [@%0a%3c $doas rcctl restart smtpd%0a%3c smtpd(ok)%0a%3c smtpd(ok)%0a%3c @]%0a%3c @@rcctl reload@@ is used to tell a service to reload it's configuration files. it's useful for places such as an irc server which restarting will cause all users getting disconnected. not all services support this action.%0a%3c it will send a signal to called service in order to reload it:%0a%3c [@%0a%3c $ doas rcctl reload nsd%0a%3c nsd(ok)%0a%3c @]%0a%3c %0a%3c some deamons ship with custom flags to change their functionality instad of a config file, you can change them with @@flags@@ if they are enabled.%0a%3c apmd is a example of following, you can set @@-H@ to apmd to set maximum perforamce mode on apmd%0a%3c [@%0a%3c $ doas rcctl set apmd flags -H%0a%3c @]%0a\ No newline at end of file%0a---%0a> you can enable it's service, or use @@rcctl %0a> %0a> @@rcctl restart@@%0a> @@rcctl reload@@ is used to tell a service to reload it's configuration files. it's useful for places such as an irc server which restarting will cause all users getting disconnected.%0a host:1627914536=198.251.81.133 author:1627911723=mkf diff:1627911723:1627911723:=1,51d0%0a%3c rcctl is a utility to manage @@/etc/rc.conf.local@@, for running, killing and managing system services.%0a%3c thankfully since rcctl is part of base system, nothing is needed to install it.%0a%3c %0a%3c %0a%3c !!commands%0a%3c %0a%3c !!!ls%0a%3c %0a%3c @@rcctl ls@@ can used for list-ing kinds of services%0a%3c examples:%0a%3c %0a%3c [@%0a%3c $ doas rcctl ls failed%0a%3c @]%0a%3c [@%0a%3c $ doas rcctl ls on%0a%3c @]%0a%3c %0a%3c @@rcctl check@@ can used to check if a service is still running or not.%0a%3c for example:%0a%3c [@%0a%3c $ doas rcctl check vmd%0a%3c @]%0a%3c %0a%3c if vmd is running:%0a%3c [@%0a%3c vmd(ok)%0a%3c @]%0a%3c %0a%3c otherwise:%0a%3c [@%0a%3c vmd(failed)%0a%3c @]%0a%3c %0a%3c @@rcctl enable@@ enables services, making them executed on next boot.%0a%3c it doesn't show anything after running.%0a%3c see start for starting a service without rebooting.%0a%3c [@%0a%3c $ doas rcctl enable xenodm%0a%3c @]%0a%3c %0a%3c @@rcctl start@@ is for starting services which are allowed to run.%0a%3c if you try to run a disabled service, following will happen:%0a%3c [@%0a%3c $ doas rcctl start sndiod%0a%3c /etc/rc.d/sndiod: need -f to force start since sndiod_flags=NO%0a%3c @]%0a%3c you can enable it's service, or use @@rcctl %0a%3c %0a%3c @@rcctl restart@@%0a%3c @@rcctl reload@@ is used to tell a service to reload it's configuration files. it's useful for places such as an irc server which restarting will cause all users getting disconnected.%0a host:1627911723=198.251.81.133