More Termux sauce

This commit is contained in:
Geoffrey Frogeye 2017-09-17 18:39:54 +02:00
parent eeb061a032
commit f9975b004d
6 changed files with 3 additions and 8 deletions

2
termux/boot/autosvc Executable file
View file

@ -0,0 +1,2 @@
#!/data/data/com.termux/files/usr/bin/bash
autosvc

1
termux/boot/symlink Normal file → Executable file
View file

@ -1 +1,2 @@
#!/data/data/com.termux/files/usr/bin/bash
echo "ln -s /data/data/com.termux/files/usr /usr" | tsu

View file

@ -9,14 +9,12 @@ LOGFILE="$HOME/.local/log/autosvc.log"
start() {
printf "Starting autosvc: "
start-stop-daemon -p "$PIDFILE" -x /data/data/com.termux/files/usr/bin/bash -S -b -m -- "$HOME/.termux/scripts/autosvc" -d -l "$LOGFILE"
termux-toast "Started autosvc"
echo "OK"
}
stop() {
printf "Stopping autosvc: "
start-stop-daemon -p "$PIDFILE" -x /data/data/com.termux/files/usr/bin/bash -K
termux-toast "Stopped autosvc"
echo "OK"
}

View file

@ -9,14 +9,12 @@ LOGFILE="$HOME/.local/log/crond.log"
start() {
printf "Starting crond: "
start-stop-daemon -p "$PIDFILE" -x crond -S -b -m -- -f -L "$LOGFILE"
termux-toast "Started crond"
echo "OK"
}
stop() {
printf "Stopping crond: "
start-stop-daemon -p "$PIDFILE" -x crond -K
termux-toast "Stopped crond"
echo "OK"
}

View file

@ -9,14 +9,12 @@ LOGFILE="$HOME/.local/log/sshd.log"
start() {
printf "Starting SSHD: "
start-stop-daemon -p "$PIDFILE" -x sshd -S -- -E "$LOGFILE"
termux-toast "Started SSHD"
echo "OK"
}
stop() {
printf "Stopping SSHD: "
start-stop-daemon -p "$PIDFILE" -x sshd -K
termux-toast "Stopped SSHD"
echo "OK"
}

View file

@ -9,14 +9,12 @@ LOGFILE="$HOME/.local/log/syncthing.log"
start() {
printf "Starting Syncthing: "
sudo start-stop-daemon -p "$PIDFILE" -x syncthing -S -b -N 5 -m -- -logfile="$LOGFILE"
termux-toast "Started Syncthing"
echo "OK"
}
stop() {
printf "Stopping Syncthing: "
sudo start-stop-daemon -p "$PIDFILE" -x syncthing -K
termux-toast "Stopped Syncthing"
echo "OK"
}