summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-10-23 14:45:58 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-10-23 14:45:58 +0000
commit2cbb6537d96c253369b3782f2250d1cf38874236 (patch)
tree6bce4332064ad7c7d1746268f1796809b754002f
parentf3c3546d5492a62f17ec7d5c5424524fc7406a09 (diff)
Proper testing that executable exists and is an executable, thanks dz.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10689 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--.inspircd.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/.inspircd.inc b/.inspircd.inc
index f1c7ce07a..37d23b8c5 100644
--- a/.inspircd.inc
+++ b/.inspircd.inc
@@ -100,6 +100,7 @@ sub start {
if (getstatus() == 1) { print "InspIRCd is already running.\n"; return 0; }
# If we are still alive here.. Try starting the IRCd..
print "$binpath/$executable doesn't exist\n" and return 0 unless(-e "$binpath/$executable");
+ print "$binpath/$executable is not executable\n" and return 0 unless(-f "$binpath/$executable" && -x "$binpath/$executable");
system("$binpath/$executable");
return 1;
@@ -110,6 +111,7 @@ sub debug {
if (getstatus() == 1) { print "InspIRCd is already running.\n"; return 0; }
print "$binpath/$executable doesn't exist\n" and return 0 unless(-e "$binpath/$executable");
+ print "$binpath/$executable is not executable\n" and return 0 unless(-f "$binpath/$executable" && -x "$binpath/$executable");
# Check we have gdb
checkgdb();
@@ -141,6 +143,7 @@ sub valdebug
if (getstatus() == 1) { print "InspIRCd is already running.\n"; return 0; }
print "$binpath/$executable doesn't exist\n" and return 0 unless(-e "$binpath/$executable");
+ print "$binpath/$executable is not executable\n" and return 0 unless(-f "$binpath/$executable" && -x "$binpath/$executable");
# Check we have valgrind and gdb
checkvalgrind();
@@ -158,6 +161,7 @@ sub screenvaldebug
if (getstatus() == 1) { print "InspIRCd is already running.\n"; return 0; }
print "$binpath/$executable doesn't exist\n" and return 0 unless(-e "$binpath/$executable");
+ print "$binpath/$executable is not executable\n" and return 0 unless(-f "$binpath/$executable" && -x "$binpath/$executable");
#Check we have gdb
checkvalgrind();