Ol' termux fixes

This commit is contained in:
Geoffrey Frogeye 2018-05-19 13:48:47 +02:00
parent 74c9d40126
commit 4424def805
2 changed files with 7 additions and 1 deletions

6
termux/scripts/tsu Executable file
View file

@ -0,0 +1,6 @@
#!/data/data/com.termux/files/usr/bin/env bash
# Force the passing of the environment variables on LineageOS where the --preserve-environment
# option on the su binary doesn't seem to work well
/data/data/com.termux/files/usr/bin/tsu -s "$(env | sed "s/^\([^=]\+\)=\(.*\)/\1='\2'/" | tr '\n' ' ') $(which bash)"

View file

@ -8,7 +8,7 @@ LOGFILE="$HOME/.local/log/syncthing.log"
start() { start() {
printf "Starting Syncthing: " printf "Starting Syncthing: "
sudo start-stop-daemon -p "$PIDFILE" -x syncthing -S -b -N 5 -m -- -logfile="$LOGFILE" sudo start-stop-daemon -p "$PIDFILE" -x syncthing -S -b -N 5 -m -- -logfile="$LOGFILE" -home ~/.config/syncthing
echo "OK" echo "OK"
} }