Init commit

This commit is contained in:
anon 2023-01-03 21:25:00 +01:00
commit e1fb073943

29
shallot.sh Normal file
View File

@ -0,0 +1,29 @@
#!/bin/bash
set -xe
echo "Shallot scritp v0.0.1"
if [[ $# -eq 0 ]] ; then
echo "No arguments was passed, exiting..."
exit 1
fi
if [[ $# -ge 2 ]] ; then
echo "Too much argument was passed, expecting to only get 1 argument, exiting..."
exit 1
fi
ONIONSITE=$1
echo "Checking if Tor Browser proxy is running..."
NETSTAT_OUTPUT=`netstat -lnp 2> /dev/null`
IF_TOR_RUNNING=`echo $NETSTAT_OUTPUT | grep -zqv "tor" && echo 0 || echo 1`
if [ "$IF_TOR_RUNNING" ] ; then
echo "Tor is running, exiting..."
exit 0;
else
echo "Tor is not running"
exit 1;
fi