From 82bfc002c0db53ffb64884de9d3e1c7e8b903d84 Mon Sep 17 00:00:00 2001 From: Alexander <alexander@ter-haar.com> Date: Sat, 16 Mar 2019 13:23:09 +0100 Subject: [PATCH] Upload New File --- deploy/Gentoo/funkwhale_beat | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 deploy/Gentoo/funkwhale_beat diff --git a/deploy/Gentoo/funkwhale_beat b/deploy/Gentoo/funkwhale_beat new file mode 100644 index 0000000000..49d427437a --- /dev/null +++ b/deploy/Gentoo/funkwhale_beat @@ -0,0 +1,27 @@ +#!/sbin/openrc-run +NAME=funkwhalebeat +PIDFILE=/var/run/$NAME.pid +USER=funkwhale +WORKDIR=/srv/funkwhale/api +Celery=/srv/funkwhale/virtualenv/bin/celery +BEAT_ARGS="-A funkwhale_api.taskapp beat -l INFO" +depend() { + need net +} + +start() { + ebegin "Starting Funkwhale Beat" + cd /srv/funkwhale/api + set -a && source /srv/funkwhale/config/.env && set +a + echo ' start beat' + start-stop-daemon --start --user $USER --make-pidfile --pidfile $PIDFILE -d $WORKDIR --exec $Celery -- $BEAT_ARGS >> /var/log/funk/worker.log 2>&1& + echo 'Started Beat' + echo + eend $? +} + +stop() { + ebegin "Stopping Funkwhale Beat" + start-stop-daemon --stop --pidfile $PIDFILE + eend $? +} -- GitLab