]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - make/template/inspircd
Sync helpop chmodes s and p with docs
[user/henk/code/inspircd.git] / make / template / inspircd
index 70072df601462645bebc9009364fff00ac8a8692..213f78043e254d2126dce60a5ff3303c269a107f 100644 (file)
@@ -6,9 +6,8 @@
 #   Copyright (C) 2015 Steven Van Acker <steven@singularity.be>
 #   Copyright (C) 2015 Attila Molnar <attilamolnar@hush.com>
 #   Copyright (C) 2014 Dan Parsons <dparsons@nyip.net>
-#   Copyright (C) 2013-2014, 2016-2019 Sadie Powell <sadie@witchery.services>
+#   Copyright (C) 2013-2014, 2016-2021 Sadie Powell <sadie@witchery.services>
 #   Copyright (C) 2012 Robby <robby@chatbelgie.be>
-#   Copyright (C) 2012 Adam <Adam@anope.org>
 #   Copyright (C) 2011 DjSlash <djslash@djslash.org>
 #   Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
 #   Copyright (C) 2008-2009 Robin Burchell <robin+git@viroteck.net>
@@ -62,12 +61,10 @@ use constant {
 };
 
 my $scriptpath = "@SCRIPT_DIR@";
-my $basepath   =       "@BASE_DIR@";
 my $confpath   =       "@CONFIG_DIR@";
 my $binpath    =       "@BINARY_DIR@";
-my $runpath    =       "@BASE_DIR@";
 my $runtimedir = "@RUNTIME_DIR@";
-my $valgrindlogpath    =       "$basepath/valgrindlogs";
+my $valgrindlogpath = "@LOG_DIR@/valgrind";
 my $executable =       "inspircd";
 my $version    =       "@VERSION_FULL@";
 my $uid = "@UID@";
@@ -211,8 +208,8 @@ sub cmd_start(@)
 {
        # Check to see its not 'running' already.
        if (getstatus() == 1) { print "InspIRCd is already running.\n"; exit GENERIC_EXIT_SUCCESS; }
+
        # If we are still alive here.. Try starting the IRCd..
-       chdir $runpath;
        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");
 
@@ -225,7 +222,6 @@ sub dev_debug(@)
        # Check to see its not 'running' already.
        if (getstatus() == 1) { print "InspIRCd is already running.\n"; return 0; }
 
-       chdir $runpath;
        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");
 
@@ -242,7 +238,6 @@ sub dev_screendebug(@)
        # Check to see its not 'running' already.
        if (getstatus() == 1) { print "InspIRCd is already running.\n"; return 0; }
 
-       chdir $runpath;
        print "$binpath/$executable doesn't exist\n" and return 0 unless(-e "$binpath/$executable");
 
        #Check we have gdb
@@ -261,7 +256,6 @@ sub dev_valdebug(@)
        # Check to see its not 'running' already.
        if (getstatus() == 1) { print "InspIRCd is already running.\n"; return 0; }
 
-       chdir $runpath;
        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");
 
@@ -282,7 +276,6 @@ sub dev_valdebug_unattended(@)
        # Check to see its not 'running' already.
        if (getstatus() == 1) { print "InspIRCd is already running.\n"; return 0; }
 
-       chdir $runpath;
        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");
 
@@ -319,7 +312,6 @@ sub dev_screenvaldebug(@)
        # Check to see its not 'running' already.
        if (getstatus() == 1) { print "InspIRCd is already running.\n"; return 0; }
 
-       chdir $runpath;
        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");