More Termux sauce
This commit is contained in:
parent
eeb061a032
commit
f9975b004d
2
termux/boot/autosvc
Executable file
2
termux/boot/autosvc
Executable file
|
@ -0,0 +1,2 @@
|
||||||
|
#!/data/data/com.termux/files/usr/bin/bash
|
||||||
|
autosvc
|
1
termux/boot/symlink
Normal file → Executable file
1
termux/boot/symlink
Normal file → Executable file
|
@ -1 +1,2 @@
|
||||||
|
#!/data/data/com.termux/files/usr/bin/bash
|
||||||
echo "ln -s /data/data/com.termux/files/usr /usr" | tsu
|
echo "ln -s /data/data/com.termux/files/usr /usr" | tsu
|
||||||
|
|
|
@ -9,14 +9,12 @@ LOGFILE="$HOME/.local/log/autosvc.log"
|
||||||
start() {
|
start() {
|
||||||
printf "Starting autosvc: "
|
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"
|
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"
|
echo "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
printf "Stopping autosvc: "
|
printf "Stopping autosvc: "
|
||||||
start-stop-daemon -p "$PIDFILE" -x /data/data/com.termux/files/usr/bin/bash -K
|
start-stop-daemon -p "$PIDFILE" -x /data/data/com.termux/files/usr/bin/bash -K
|
||||||
termux-toast "Stopped autosvc"
|
|
||||||
echo "OK"
|
echo "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,14 +9,12 @@ LOGFILE="$HOME/.local/log/crond.log"
|
||||||
start() {
|
start() {
|
||||||
printf "Starting crond: "
|
printf "Starting crond: "
|
||||||
start-stop-daemon -p "$PIDFILE" -x crond -S -b -m -- -f -L "$LOGFILE"
|
start-stop-daemon -p "$PIDFILE" -x crond -S -b -m -- -f -L "$LOGFILE"
|
||||||
termux-toast "Started crond"
|
|
||||||
echo "OK"
|
echo "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
printf "Stopping crond: "
|
printf "Stopping crond: "
|
||||||
start-stop-daemon -p "$PIDFILE" -x crond -K
|
start-stop-daemon -p "$PIDFILE" -x crond -K
|
||||||
termux-toast "Stopped crond"
|
|
||||||
echo "OK"
|
echo "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,14 +9,12 @@ LOGFILE="$HOME/.local/log/sshd.log"
|
||||||
start() {
|
start() {
|
||||||
printf "Starting SSHD: "
|
printf "Starting SSHD: "
|
||||||
start-stop-daemon -p "$PIDFILE" -x sshd -S -- -E "$LOGFILE"
|
start-stop-daemon -p "$PIDFILE" -x sshd -S -- -E "$LOGFILE"
|
||||||
termux-toast "Started SSHD"
|
|
||||||
echo "OK"
|
echo "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
printf "Stopping SSHD: "
|
printf "Stopping SSHD: "
|
||||||
start-stop-daemon -p "$PIDFILE" -x sshd -K
|
start-stop-daemon -p "$PIDFILE" -x sshd -K
|
||||||
termux-toast "Stopped SSHD"
|
|
||||||
echo "OK"
|
echo "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,14 +9,12 @@ 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"
|
||||||
termux-toast "Started Syncthing"
|
|
||||||
echo "OK"
|
echo "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
printf "Stopping Syncthing: "
|
printf "Stopping Syncthing: "
|
||||||
sudo start-stop-daemon -p "$PIDFILE" -x syncthing -K
|
sudo start-stop-daemon -p "$PIDFILE" -x syncthing -K
|
||||||
termux-toast "Stopped Syncthing"
|
|
||||||
echo "OK"
|
echo "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue