ayaports/user/listmonk/listmonk.openrc

30 lines
719 B
Text
Raw Normal View History

2024-02-23 06:20:52 +00:00
#!/sbin/openrc-run
name="$RC_SVCNAME"
cfgfile="/etc/conf.d/$RC_SVCNAME.conf"
pidfile="/run/$RC_SVCNAME.pid"
working_directory="/usr/share/webapps/listmonk"
command="/usr/share/webapps/listmonk/listmonk"
command_user="listmonk"
command_group="listmonk"
start_stop_daemon_args=""
command_background="yes"
output_log="/var/log/listmonk/$RC_SVCNAME.log"
error_log="/var/log/listmonk/$RC_SVCNAME.err"
depend() {
need postgresql
}
start_pre() {
cd "$working_directory"
checkpath --directory --owner $command_user:$command_group --mode 0775 \
/var/log/listmonk \
/var/lib/listmonk
}
stop_pre() {
ebegin "Killing child processes"
kill $(ps -o pid= --ppid $(cat $pidfile)) || true
}