Add gotosocial-bin ebuild
Signed-off-by: Stefan Knoblich <stkn@bitplumber.de>
This commit is contained in:
21
www-apps/gotosocial-bin/files/gotosocial.initd
Normal file
21
www-apps/gotosocial-bin/files/gotosocial.initd
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
GOTOSOCIAL_USER="${GOTOSOCIAL_USER:-gotosocial}"
|
||||
GOTOSOCIAL_GROUP="${GOTOSOCIAL_GROUP:-gotosocial}"
|
||||
GOTOSOCIAL_CONFIG="${GOTOSOCIAL_CONFIG:-/etc/gotosocial/config.yml}"
|
||||
GOTOSOCIAL_DATA_DIR="${GOTOSOCIAL_DATA_DIR:-/var/lib/gotosocial}"
|
||||
GOTOSOCIAL_LOG_DIR="${GOTOSOCIAL_LOG_DIR:-/var/log/gotosocial}"
|
||||
|
||||
command="/usr/bin/gotosocial"
|
||||
command_args="--config ${GOTOSOCIAL_CONFIG}"
|
||||
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
command_background="true"
|
||||
start_stop_daemon_args="--user=\"${GOTOSOCIAL_USER}\" --group=\"${GOTOSOCIAL_GROUP}\" --stdout ${GOTOSOCIAL_LOG_DIR}/gotosocial.log --stderr ${GOTOSOCIAL_LOG_DIR}/gotosocial.err server start"
|
||||
|
||||
start_pre() {
|
||||
checkpath -d -o "${GOTOSOCIAL_USER}" -m750 "${GOTOSOCIAL_DATA_DIR}"
|
||||
checkpath -d -o "${GOTOSOCIAL_USER}" -m750 "${GOTOSOCIAL_LOG_DIR}"
|
||||
}
|
||||
Reference in New Issue
Block a user