Add gotosocial-bin ebuild
Signed-off-by: Stefan Knoblich <stkn@bitplumber.de>
This commit is contained in:
0
www-apps/gotosocial-bin/files/gotosocial.confd
Normal file
0
www-apps/gotosocial-bin/files/gotosocial.confd
Normal file
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}"
|
||||
}
|
||||
18
www-apps/gotosocial-bin/files/gotosocial.service
Normal file
18
www-apps/gotosocial-bin/files/gotosocial.service
Normal file
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=gotosocial Web Application
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
WorkingDirectory=/var/lib/gotosocial
|
||||
StateDirectory=gotosocial
|
||||
StateDirectoryMode=0750
|
||||
CacheDirectory=gotosocial
|
||||
CacheDirectoryMode=0750
|
||||
|
||||
User=gotosocial
|
||||
Group=gotosocial
|
||||
|
||||
ExecStart=/usr/bin/gotosocial --config /etc/gotosocial/config.yml server start
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user