Openbsd.Rcctl 6.6 KB

12345678910111213141516171819202122
  1. version=pmwiki-2.2.130 ordered=1 urlencoded=1
  2. agent=Mozilla/5.0 (Windows NT 5.1; rv:68.0) Gecko/20100101 Goanna/4.8 Firefox/68.0 Mypal/29.3.0
  3. author=mkf
  4. charset=UTF-8
  5. csum=
  6. ctime=1627916572
  7. host=198.251.81.133
  8. name=Openbsd.Rcctl
  9. rev=3
  10. targets=
  11. text=rcctl(8) 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!!commands%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@]
  12. time=1629666468
  13. author:1629666468=mkf
  14. diff:1629666468:1627916763:=1c1%0a%3c rcctl(8) is a utility to manage @@/etc/rc.conf.local@@, for running, killing and managing system services.%0a---%0a> rcctl is a utility to manage @@/etc/rc.conf.local@@, for running, killing and managing system services.%0a3a4%0a> %0a4a6%0a> %0a
  15. host:1629666468=198.251.81.133
  16. author:1627916763=mkf
  17. diff:1627916763:1627916572:=
  18. host:1627916763=198.251.81.133
  19. author:1627916572=mkf
  20. diff:1627916572:1627916572:=1,106d0%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 !!!check%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 !!!enable%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 !!!disable%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%3c [@%0a%3c rcctl disable xendom%0a%3c @]%0a%3c %0a%3c !!!start%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 !!!stop%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 !!!restart%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 %0a%3c !!!reload%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 !!!flag%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%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%3c @]%0a\ No newline at end of file%0a
  21. host:1627916572=198.251.81.133