]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - make/template/inspircd
Add the User and Group options to the systemd service unit template file.
[user/henk/code/inspircd.git] / make / template / inspircd
index f34345cea54fd4abc05edfc8af79a96cbd4bfdcd..91b2694121f2ed05eb0079c56a3b1b129810decd 100644 (file)
@@ -59,7 +59,7 @@ my $executable        =       "inspircd";
 my $version    =       "@VERSION_FULL@";
 my $uid = "@UID@";
 
-if (!("--runasroot" ~~ @ARGV) && ($< == 0 || $> == 0)) {
+if (!(grep { $_ eq '--runasroot' } @ARGV) && ($< == 0 || $> == 0)) {
        if ($uid !~ /^\d+$/) {
                # Named UID, look it up
                $uid = getpwnam $uid;
@@ -312,7 +312,7 @@ sub cmd_stop()
        # Get to here, we have something to kill.
        my $pid = getprocessid();
        print "Stopping InspIRCd (pid: $pid)...\n";
-       my $maxwait = (`ps -o command $pid` =~ /valgrind/i) ? 90 : 15;
+       my $maxwait = (`ps -o command $pid 2>/dev/null` =~ /valgrind/i) ? 90 : 15;
        kill TERM => $pid or die "Cannot terminate IRCd: $!\n";
        for (1..$maxwait) {
                sleep 1;