diff options
-rw-r--r-- | etc/function | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/etc/function b/etc/function index 3b6e122..783d79b 100644 --- a/etc/function +++ b/etc/function @@ -12,7 +12,14 @@ unset funcfile function Start Stop Restart Reload { typeset script + function __sudo { + if ((EUID)) { + sudo $* + } else { + $* + } + } for script in $*; { - sudo /etc/init.d/$script ${0:l} + __sudo /etc/init.d/$script ${0:l} } } |