1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#!/bin/bash # Prints if the tor service is enabled or not # Requires tor TOR_ENABLED='ﴣ' TOR_DISABLED='' get_tor() { status=$(systemctl is-active tor.service) if [ "$status" == "active" ] then echo "$TOR_ENABLED" else : #echo "$TOR_DISABLED" fi } get_tor