Skip to content

Instantly share code, notes, and snippets.

@bfgits
Created July 18, 2017 06:13
Show Gist options
  • Save bfgits/02543ffa5d7baa7cc2a6b66f7b668b4e to your computer and use it in GitHub Desktop.
Save bfgits/02543ffa5d7baa7cc2a6b66f7b668b4e to your computer and use it in GitHub Desktop.
sslocal command line script in zsh
#zsh alias
alias 'ss1=nohup sslocal -q -c ~/.ss-config1.json > /dev/null 2>&1 &'
kill-sslocal
cat /usr/local/bin/ks
#!/bin/bash
proxy_process_id=`ps -ef |grep -v grep |grep 'sslocal'|awk '{print $2}'`
#echo $proxy_process_id
if [[ ${proxy_process_id} ]]; then
/bin/kill -9 ${proxy_process_id}
echo "sslocal has been killed"
else
echo "No sslocal"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment