aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
Diffstat (limited to 'functions')
-rw-r--r--functions3
1 files changed, 2 insertions, 1 deletions
diff --git a/functions b/functions
index e4d46d0..2c3a6d5 100644
--- a/functions
+++ b/functions
@@ -170,8 +170,9 @@ ck_daemon() {
[[ ! -f /run/daemons/$1 ]]
}
+# Check if $1 is a valid daemon name
have_daemon() {
- [[ -x /etc/rc.d/$1 ]]
+ [[ -f /etc/rc.d/$1 && -x /etc/rc.d/$1 ]]
}
start_daemon() {