-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move config.ini, user_script.sh into $HOME/.config/vpngate-with-proxy
- Loading branch information
ductin
committed
Apr 22, 2017
1 parent
541baee
commit 43bf43b
Showing
3 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
# This file must be bash script. | ||
# If you need sh/csh/ksh ... then call them within this file. | ||
# This file will be executed with "root" privilege! | ||
# Drop privilege by: su user_name -c "cmd to run" | ||
# DNS should be changed within main program, not here! | ||
# If you manually change your DNS here, you should turn of 'DNS fix' of main program. | ||
|
||
# setup any environment variable that you need | ||
set -e | ||
export PATH="$PATH:/usr/sbin:/sbin" | ||
|
||
USER=$(whoami) | ||
echo $USER | ||
|
||
# Don't modified this block | ||
case "$1" in | ||
up) | ||
# _____ your code here _____ | ||
echo "called Up script" | ||
notify-send "$(hostname): LINK IS UP." --icon=network-idle | ||
|
||
# _____ end up script ______ | ||
;; | ||
down) | ||
# _____ your code here _____ | ||
echo "called Down script" | ||
notify-send "$(hostname): LINK IS DOWN !" --icon=dialog-error | ||
|
||
# _____ end down script ____ | ||
;; | ||
esac | ||
|
||
# anything outside "case" block will be executed twice! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters