kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
28 wiersze
681 B
Plaintext
28 wiersze
681 B
Plaintext
#!/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 $?
|
|
}
|