Skip to content

Instantly share code, notes, and snippets.

@Yinchie
Last active August 14, 2018 11:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Yinchie/0cd30770d0149579670a61d381cb0b5f to your computer and use it in GitHub Desktop.
Save Yinchie/0cd30770d0149579670a61d381cb0b5f to your computer and use it in GitHub Desktop.
dnscrypt-wrapper - check whether keys needs to be renewed.
#cd /opt/dnscrypt-wrapper/sbin
pids=`ps ax|egrep "dnscrypt-wrapper.*2.dnscrypt-cert.ns0.dnscrypt.nl" | grep -v grep | awk ' { print $1 }'`
echo Starting a new Wrapper
sudo bash /opt/dnscrypt-wrapper/sbin/dnscrypt-wrapper.sh
echo Sleeping
sleep 6
echo Killing
if [ "$pids" != "" ]; then
sudo kill -9 $pids
echo Done! Result: $?
else
echo Done! Starting
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment