Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ali77gh committed Jan 16, 2022
1 parent 962837b commit 79deedb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ then
fi
if [ "$platform" = "Darwin" ]
then
install_path="/usr/local/shecan-cli"
install_path="/usr/local/bin/shecan-cli"
fi

# download
Expand Down
11 changes: 6 additions & 5 deletions shecan.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@

# linux configs
dns_file = "/etc/resolv.conf"
dns_file_bak = "/etc/resolv.conf.tmp"
dns_file_bak = "/etc/resolv.conf.shecan.bak"

# OS X configs
interface = "Wi-Fi"
dns_file_bak_mac = "/etc/resolv.conf.tmp"
user = os.popen("whoami").read()
dns_file_bak_mac = f"/User/{user}/.shecan-cli"

def check_root():
if os.geteuid() != 0:
Expand Down Expand Up @@ -108,23 +109,23 @@ def disable():
def enable():
if platform=="Linux":
Linux_dns_util.enable()
elif platform=="darwin":
elif platform=="Darwin":
Darwin_dns_util.enable()
else:
print(f"{platform} is not supported")

def disable():
if platform=="Linux":
Linux_dns_util.disable()
elif platform=="darwin":
elif platform=="Darwin":
Darwin_dns_util.disable()
else:
print(f"{platform} is not supported")

def local_status():
if platform=="Linux":
Linux_dns_util.local_status()
elif platform=="darwin":
elif platform=="Darwin":
Darwin_dns_util.local_status()
else:
print(f"{platform} is not supported")
Expand Down

0 comments on commit 79deedb

Please sign in to comment.