vault.initd 619 B

12345678910111213141516171819202122232425
  1. #!/sbin/openrc-run
  2. # Copyright 2015-2017 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. description="vault server"
  5. group=${group:-${SVCNAME}}
  6. pidfile=${pidfile:-"/run/${SVCNAME}/${SVCNAME}.pid"}
  7. user=${user:-${SVCNAME}}
  8. command="/usr/bin/${SVCNAME}"
  9. command_args="server ${command_args}"
  10. command_background="true"
  11. start_stop_daemon_args="--user ${user} --group ${group} \
  12. --stdout /var/log/${SVCNAME}/${SVCNAME}.log \
  13. --stderr /var/log/${SVCNAME}/${SVCNAME}.log"
  14. depend() {
  15. need net
  16. after net
  17. }
  18. start_pre() {
  19. checkpath -d -m 0755 -o "${user}":"${group}" "${pidfile%/*}"
  20. }