]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - make/template/inspircd
Remove support for Interix and SunOS from the Makefile.
[user/henk/code/inspircd.git] / make / template / inspircd
index 88eb7ee6a81e8fb940b5b72fc43ff312296123e7..139177100a9f46a7245420a74dda9b1ec05179fa 100644 (file)
@@ -26,13 +26,14 @@ use Fcntl;
 my $basepath   =       "@BASE_DIR@";
 my $confpath   =       "@CONFIG_DIR@/";
 my $binpath    =       "@BINARY_DIR@";
-my $runpath    =       "@DATA_DIR@";
+my $runpath    =       "@BASE_DIR@";
+my $datadir    =       "@DATA_DIR@";
 my $valgrindlogpath    =       "$basepath/valgrindlogs";
 my $executable =       "@EXECUTABLE@";
 my $version    =       "@VERSION@";
 my $uid = "@UID@";
 
-if ($< == 0 || $> == 0) {
+if (!("--runasroot" ~~ @ARGV) && ($< == 0 || $> == 0)) {
        if ($uid !~ /^\d+$/) {
                # Named UID, look it up
                $uid = getpwnam $uid;
@@ -382,7 +383,7 @@ sub getpidfile
        }
 
        # End of includes / No includes found. Using default.
-       $pidfile = $runpath . "/inspircd.pid";
+       $pidfile = $datadir . "/inspircd.pid";
 }
 
 sub getstatus {