16 lines
213 B
Bash
16 lines
213 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
if [[ "$UID" != 0 ]]; then
|
||
|
echo "USER NOT ROOT"
|
||
|
sudo "$0"
|
||
|
exit
|
||
|
else
|
||
|
echo "USER IS ROOT"
|
||
|
fi
|
||
|
|
||
|
$status=$(systemctl status tor)
|
||
|
|
||
|
if [[ "$status" != 0 ]]; then
|
||
|
systemctl restart tor
|
||
|
fi
|