diff --git a/tinc-update b/tinc-update index 105dc68..a092b9e 100755 --- a/tinc-update +++ b/tinc-update @@ -17,17 +17,14 @@ else die "git not found. install git to use this script" fi -reload_tinc() { - echo "Reload tinc..." - sudo tinc -c . reload -} - if [[ $EUID -ne 0 ]]; then if has sudo; then - reload_tinc + echo "Reload tinc..." + sudo tinc -c . reload else die "run this script as root" fi else - reload_tinc + echo "Reload tinc..." + tinc -c . reload fi