Skip to content

Commit

Permalink
Fixes BlackArch#12
Browse files Browse the repository at this point in the history
Use a permanent dir to store backups.
  • Loading branch information
Edu4rdSHL committed Mar 30, 2021
1 parent c718d9e commit 56fd000
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions torctl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ if [ -t 1 ]; then
fi

# backup dir
BACKUPDIR="/tmp/torctl"
BACKUPDIR="/var/lib/torctl"

# print error and exit
err() {
Expand Down Expand Up @@ -246,7 +246,7 @@ SocksPort 127.0.0.1:9050 IsolateClientAddr IsolateSOCKSAuth IsolateClientProtoco
ControlPort 9051
HashedControlPassword 16:FDE8ED505C45C8BA602385E2CA5B3250ED00AC0920FEC1230813A1F86F
DNSPort 127.0.0.1:$TOR_DNS
Sandbox 1
# Sandbox 1 - tor package is not built with --enable-seccomp required to use this option.
HardwareAccel 1
TestSocks 1
AllowNonRFC953Hostnames 0
Expand Down Expand Up @@ -586,55 +586,63 @@ usage() {
main() {
banner

check_backup_dir

case "$1" in
start)
check_root
check_backup_dir
start
;;
stop)
check_root
check_backup_dir
stop
;;
status)
check_root
check_backup_dir
status
;;
restart)
check_root
check_backup_dir
stop
sleep 1
start
;;
autowipe)
check_root
check_backup_dir
autowipe
;;
autostart)
check_root
check_backup_dir
autostart
;;
ip)
get_ip
;;
chngid)
check_root
check_backup_dir
chngid
;;
chngmac)
check_root
check_backup_dir
chngmac
;;
rvmac)
check_root
check_backup_dir
rvmac
;;
version)
version
;;
wipe)
check_root
check_backup_dir
wipe
;;
*)
Expand Down

0 comments on commit 56fd000

Please sign in to comment.