You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ergo.initd 768B

1234567891011121314151617181920212223242526272829303132
  1. #!/sbin/openrc-run
  2. name=${RC_SVCNAME}
  3. description="ergo IRC daemon"
  4. command=/usr/bin/ergo
  5. command_args="run --conf ${ERGO_CONFIGFILE:-'/etc/ergo/ircd.yaml'}"
  6. command_user=${ERGO_USERNAME:-ergo}
  7. command_background=true
  8. pidfile=/var/run/${RC_SVCNAME}.pid
  9. output_log="/var/log/${RC_SVCNAME}.out"
  10. error_log="/var/log/${RC_SVCNAME}.err"
  11. # --wait: to wait 1 second after launching to see if it survived startup
  12. start_stop_daemon_args="--wait 1000"
  13. extra_started_commands="reload"
  14. depend() {
  15. use dns
  16. provide ircd
  17. }
  18. start_pre() {
  19. checkpath --owner ${command_user}:${command_user} --mode 0640 --file /var/log/${RC_SVCNAME}.out /var/log/${RC_SVCNAME}.err
  20. }
  21. reload() {
  22. ebegin "Reloading ${RC_SVCNAME}"
  23. start-stop-daemon --signal HUP --pidfile "${pidfile}"
  24. eend $?
  25. }