#!/sbin/openrc-run # Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 output_log="${output_log:-/dev/null}" error_log="${error_log:-${CRYPTPAD_LOGDIR}/error.log}" directory="${directory:-/usr/share/cryptpad}" command="/usr/bin/node" command_args="${directory}/server.js" command_user="${command_user:-cryptpad:cryptpad}" command_background=true pidfile="/run/${RC_SVCNAME}.pid" retry="${retry:-TERM/30/KILL/5}" start_stop_daemon_args="${SSD_OPTS:--w 1000}" depend() { after net } start_pre() { checkpath -d -m 0750 -o "${command_user}" \ "${CRYPTPAD_DATADIR}" "${CRYPTPAD_LOGDIR}" }