From 15e8f62893345e38fa49e6d0cdb00034afbc04c9 Mon Sep 17 00:00:00 2001 From: Alexander <alexander@ter-haar.com> Date: Sat, 16 Mar 2019 13:22:54 +0100 Subject: [PATCH] Upload New File --- deploy/Gentoo/funkwhale_server | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 deploy/Gentoo/funkwhale_server diff --git a/deploy/Gentoo/funkwhale_server b/deploy/Gentoo/funkwhale_server new file mode 100644 index 0000000000..926bd01d16 --- /dev/null +++ b/deploy/Gentoo/funkwhale_server @@ -0,0 +1,29 @@ +#!/sbin/openrc-run + +NAME=funkwhaleserver +PIDFILE=/var/run/$NAME.pid +USER=funkwhale +DAEMON_ARGS="-b 127.0.0.1 -p 5000 config.asgi:application --proxy-headers " +Daphne=/srv/funkwhale/virtualenv/bin/daphne +WORKDIR=/srv/funkwhale/api + +depend() { + need net redis postgresql nginx funkwhale_beat funkwhale_worker +} + +start() { + ebegin "Starting Funkwhale Server" + cd /srv/funkwhale/api + set -a && source /srv/funkwhale/config/.env && set +a + echo 'Starting Funkwhale Server' + start-stop-daemon --start --user $USER --make-pidfile --pidfile $PIDFILE -d $WORKDIR --exec $Daphne -- $DAEMON_ARGS >> /var/log/funk/daphne.log 2>&1& + echo 'Funkwhale Server started' + echo + eend $? +} + +stop() { + ebegin "Stopping Funkwhale" + start-stop-daemon --stop --pidfile $PIDFILE + eend $? +} -- GitLab