diff options
author | Britney Fransen <brfransen@gmail.com> | 2020-05-30 23:12:52 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2020-05-30 23:12:52 (GMT) |
commit | 84161298f3673a9e8bb109c6cfaecf605c1b1ef6 (patch) | |
tree | da0eb74fef54488f9fb89f35b6ae5a564a1076fc /abs/core/runit-scripts/runitscripts/services | |
parent | c3fbba38954048149daf34fa27dc5564f8898042 (diff) | |
download | linhes_pkgbuild-84161298f3673a9e8bb109c6cfaecf605c1b1ef6.zip linhes_pkgbuild-84161298f3673a9e8bb109c6cfaecf605c1b1ef6.tar.gz linhes_pkgbuild-84161298f3673a9e8bb109c6cfaecf605c1b1ef6.tar.bz2 |
runit-scripts: add service for rslsync
Diffstat (limited to 'abs/core/runit-scripts/runitscripts/services')
-rwxr-xr-x | abs/core/runit-scripts/runitscripts/services/rslsync/run | 21 |
1 files changed, 21 insertions, 0 deletions
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 |