From fca3a308fbc3196b67ac65fbf03a32870ac7da3a Mon Sep 17 00:00:00 2001
From: Alexander <alexander@ter-haar.com>
Date: Sat, 16 Mar 2019 13:23:20 +0100
Subject: [PATCH] Upload New File

---
 deploy/Gentoo/funkwhale_worker | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 deploy/Gentoo/funkwhale_worker

diff --git a/deploy/Gentoo/funkwhale_worker b/deploy/Gentoo/funkwhale_worker
new file mode 100644
index 0000000000..faa54f2929
--- /dev/null
+++ b/deploy/Gentoo/funkwhale_worker
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+NAME=funkwhaleworker
+PIDFILE=/var/run/$NAME.pid
+USER=funkwhale
+WORKDIR=/srv/funkwhale/api 
+Celery=/srv/funkwhale/virtualenv/bin/celery 
+WORKER_ARGS=" -A funkwhale_api.taskapp worker -l INFO"
+
+depend() {
+        need net 
+}
+
+start() {
+	ebegin "Starting Funkwhale Worker"
+        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 -- $WORKER_ARGS >> /var/log/funk/worker.log 2>&1&
+        echo 'Started Worker'
+	echo
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping Funkwhale Worker"
+	start-stop-daemon --stop --pidfile $PIDFILE
+	eend $?
+}
-- 
GitLab