From 84161298f3673a9e8bb109c6cfaecf605c1b1ef6 Mon Sep 17 00:00:00 2001 From: Britney Fransen Date: Sat, 30 May 2020 23:12:52 +0000 Subject: runit-scripts: add service for rslsync --- abs/core/runit-scripts/PKGBUILD | 4 ++-- .../runit-scripts/runitscripts/services/rslsync/run | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100755 abs/core/runit-scripts/runitscripts/services/rslsync/run diff --git a/abs/core/runit-scripts/PKGBUILD b/abs/core/runit-scripts/PKGBUILD index 215e019..30dede0 100755 --- a/abs/core/runit-scripts/PKGBUILD +++ b/abs/core/runit-scripts/PKGBUILD @@ -1,6 +1,6 @@ pkgname=runit-scripts -pkgver=8.6 -pkgrel=4 +pkgver=8.7 +pkgrel=1 pkgdesc="collection of startup scripts for runit" url="http://smarden.org/runit/" license=('BSD') diff --git a/abs/core/runit-scripts/runitscripts/services/rslsync/run b/abs/core/runit-scripts/runitscripts/services/rslsync/run new file mode 100755 index 0000000..089c979 --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/rslsync/run @@ -0,0 +1,21 @@ +#!/bin/sh +exec 2>&1 +export TERM=linux +. /etc/rc.conf +. /etc/rc.d/functions +stat_runit "Starting rslsync daemon" + +FILE=/home/mythtv/.config/rslsync/rslsync.conf +STORAGE=/data/storage/disk0/media/resilio/.sync + +if [ ! -f "$FILE" ]; then + mkdir -p /home/mythtv/.config/rslsync/ + cp /etc/rslsync.conf "$FILE" + chown -R mythtv:mythtv /home/mythtv/.config/rslsync +fi +if [ ! -d "$STORAGE" ]; then + mkdir -p $STORAGE + chown -R mythtv:mythtv /data/storage/disk0/media/resilio/ +fi + +exec chpst -umythtv /usr/bin/rslsync --nodaemon --config $FILE --storage $STORAGE -- cgit v0.12