jtc-overlay/app-office/wekan/files/wekan.initd-r1

32 lines
893 B
Plaintext
Raw Normal View History

2022-08-30 19:46:53 +00:00
#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
: ${WEKAN_USER:=wekan}
: ${WEKAN_LOG_DIR:="/var/log/wekan"}
: ${WEKAN_LOG_APP:="${WEKAN_LOG_DIR}/app.log"}
: ${WEKAN_LOG_ERR:="${WEKAN_LOG_DIR}/err.log"}
: ${SSD_OPTS:="--wait 1000 -1 ${WEKAN_LOG_APP} -2 ${WEKAN_LOG_ERR}"}
command="/usr/libexec/wekan/npm/bin/node"
command_args="/usr/share/wekan/main.js"
command_user="${WEKAN_USER}"
command_background=true
pidfile="/run/${SVCNAME}.pid"
retry=${WEKAN_TERMTIMEOUT:-"TERM/60/KILL/5"}
start_stop_daemon_args="${SSD_OPTS} \
-e \"MONGO_URL=${WEKAN_MONGO_URL}\" \
-e \"ROOT_URL=${WEKAN_ROOT_URL}\" \
-e \"PORT=${WEKAN_PORT}\" \
-e \"MAIL_URL=${WEKAN_MAIL_URL}\" \
-e \"MAIL_FROM=${WEKAN_MAIL_FROM}\""
depend() {
need net
after mongodb
}
start_pre() {
checkpath -d -m 0750 -o ${WEKAN_USER} "${WEKAN_LOG_DIR}"
}