Created
July 8, 2019 16:51
-
-
Save EthraZa/641025b9512abb56f16504b5d2e9a558 to your computer and use it in GitHub Desktop.
Termux simple init script - Goes in $PREFIX/etc/profile.d/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ENABLED=1 | |
PROC="sshd" | |
CMD=$PROC | |
if [ $ENABLED = 1 ] ; then | |
if pgrep -f $PROC >/dev/null ; then | |
echo "[$PROC is running]" | |
else | |
echo "[Starting $PROC...]" && $CMD && echo "[OK]" | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment