32 lines
893 B
Plaintext
32 lines
893 B
Plaintext
|
|
#!/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}"
|
||
|
|
}
|