Skip to content

Instantly share code, notes, and snippets.

@EthraZa
Created July 8, 2019 16:51
Show Gist options
  • Save EthraZa/641025b9512abb56f16504b5d2e9a558 to your computer and use it in GitHub Desktop.
Save EthraZa/641025b9512abb56f16504b5d2e9a558 to your computer and use it in GitHub Desktop.
Termux simple init script - Goes in $PREFIX/etc/profile.d/
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