#!/bin/sh # $FreeBSD: head/security/p5-openxpki/files/openxpki.in 373950 2014-12-04 15:23:44Z culot $ # # PROVIDE: openxpki # REQUIRE: LOGIN # REQUIRE: postgresql # REQUIRE: mysql # KEYWORD: shutdown # # Define this variable in file /etc/rc.conf: # openxpki_enable="YES" # to ensure that openxpki starts at boot time. # Define and edit this variable in file /etc/rc.conf: # openxpki_conf="%%PREFIX%%/etc/openxpki/config.git" # if your configuration is in different place. # # DO NOT CHANGE THESE DEFAULT VALUES HERE # SET THEM IN THE /etc/rc.conf FILE # . /etc/rc.subr name=openxpki desc="OpenXPKI daemon" rcvar=openxpki_enable load_rc_config ${name} : ${openxpki_enable:=no} : ${openxpki_conf=%%PREFIX%%/etc/openxpki/config.git} command=%%PREFIX%%/bin/openxpkictl procname=openxpkid openxpki_user=${name} pidfile=/var/openxpki/openxpkid.pid extra_commands=reload start_cmd=control stop_cmd=control restart_cmd=control status_cmd=control reload_cmd=control control() { USER=${openxpki_user} ${command} --config ${openxpki_conf} ${rc_arg} } run_rc_command "$1"