X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Ftemplate%2Finspircd;h=139177100a9f46a7245420a74dda9b1ec05179fa;hb=414d9f0b30542d9b90fcea4e8345b012050b7de7;hp=a75140c5dbcd8fccaa20c07501e763143b30ba8a;hpb=553a8da754c8cd308bad2008018849714e70f9b7;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/make/template/inspircd b/make/template/inspircd index a75140c5d..139177100 100644 --- a/make/template/inspircd +++ b/make/template/inspircd @@ -27,12 +27,13 @@ my $basepath = "@BASE_DIR@"; my $confpath = "@CONFIG_DIR@/"; my $binpath = "@BINARY_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 . "/data/inspircd.pid"; + $pidfile = $datadir . "/inspircd.pid"; } sub getstatus {