Skip to content

Commit f2cd3d8

Browse files
committed
rslsync/run: get $RUNAS_USER from /etc/envvars (and remove sed hack)
1 parent 4691c70 commit f2cd3d8

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

root/etc/run_once/config_rslsync

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ else
3030
addgroup -g $RUNAS_GID -S $RUNAS_GROUP
3131
adduser -u $RUNAS_UID -D -S -G $RUNAS_GROUP $RUNAS_USER
3232

33-
sed -i'' "s/root/$RUNAS_USER/" /etc/sv/rslsync/run
34-
3533
chown -R $RUNAS_USER /etc/rslsync
3634
if [ -z $LOG_TO_STDOUT ]; then
3735
touch /var/log/rslsync.log

root/etc/sv/rslsync/run

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#!/bin/sh
22
exec 2>&1
3+
source /etc/envvars
34
LOG_LOCATION=""
45
if [ -z $LOG_TO_STDOUT ]
56
LOG_LOCATION=" --log /var/log/rslsync.log "
67
fi
7-
su -c "/usr/local/bin/rslsync --config /etc/rslsync/rslsync.conf $LOG_LOCATION --nodaemon" -s /bin/sh root
8+
su -c "/usr/local/bin/rslsync --config /etc/rslsync/rslsync.conf $LOG_LOCATION --nodaemon" -s /bin/sh $RUNAS_USER

0 commit comments

Comments
 (0)