Phylongue
New Around Here
I have installed syncthing on GT-AX11000 running AsusWRT-Merlin. However, it is being run as root user "admin". I was wondering if there is a possibility to change the user who runs it.
I used the following command:
It created the following service file
I used the following command:
opkg install syncthing
It created the following service file
Bash:
#!/bin/sh
ENABLED=yes
PROCS=syncthing
ARGS=""
PREARGS=""
DESC=$PROCS
PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
. /opt/etc/init.d/rc.func
if [ ! -d /opt/etc/syncthing ]; then
syncthing -generate="/opt/etc/syncthing"
sed -i 's|127.0.0.1:8384|0.0.0.0:8384|' /opt/etc/syncthing/config.xml
elif [[ -f /opt/etc/syncthing/config.xml ]]; then
sed -i 's|127.0.0.1:8384|0.0.0.0:8384|' /opt/etc/syncthing/config.xml
fi