X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Ftemplate%2Finspircd;h=c14099323ea81487c06ab622f5a2b201f9212c3d;hb=1031f333332cf1b09db4fd632f141143ee637c34;hp=d5e89040ddd6a240a0285732e23da77659023ac2;hpb=0c23190956104cb62494e5b399bacd45ff2ca464;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/make/template/inspircd b/make/template/inspircd index d5e89040d..c14099323 100644 --- a/make/template/inspircd +++ b/make/template/inspircd @@ -1,16 +1,24 @@ #!/usr/bin/env perl -# +------------------------------------+ -# | Inspire Internet Relay Chat Daemon | -# +------------------------------------+ + +# +# InspIRCd -- Internet Relay Chat Daemon +# +# Copyright (C) 2009-2010 Daniel De Graaf # -# InspIRCd: (C) 2002-2010 InspIRCd Development Team -# See: http://wiki.inspircd.org/Credits +# This file is part of InspIRCd. InspIRCd is free software: you can +# redistribute it and/or modify it under the terms of the GNU General Public +# License as published by the Free Software Foundation, version 2. # -# This program is free but copyrighted software; see -# the file COPYING for details. +# This program is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. # -# --------------------------------------------------- +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . # + + use strict; use POSIX; use Fcntl; @@ -19,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 $executable = "inspircd"; 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; @@ -374,7 +383,7 @@ sub getpidfile } # End of includes / No includes found. Using default. - $pidfile = $runpath . "/data/inspircd.pid"; + $pidfile = $datadir . "/inspircd.pid"; } sub getstatus {