X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=make%2Ftemplate%2Finspircd;h=f34345cea54fd4abc05edfc8af79a96cbd4bfdcd;hb=2d50984185c7902d37783a98f19637c86694a452;hp=8405c2a6b8fbf6400b1d81227bb3115d40878af1;hpb=9b99c5ad31eb8de222d2b3aa1daa9412f0b25857;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/make/template/inspircd b/make/template/inspircd index 8405c2a6b..f34345cea 100644 --- a/make/template/inspircd +++ b/make/template/inspircd @@ -48,6 +48,7 @@ use constant { GENERIC_EXIT_NOT_RUNNING => 7 }; +my $scriptpath = "@SCRIPT_DIR@"; my $basepath = "@BASE_DIR@"; my $confpath = "@CONFIG_DIR@/"; my $binpath = "@BINARY_DIR@"; @@ -55,7 +56,7 @@ my $runpath = "@BASE_DIR@"; my $datadir = "@DATA_DIR@"; my $valgrindlogpath = "$basepath/valgrindlogs"; my $executable = "inspircd"; -my $version = "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@+@VERSION_LABEL@"; +my $version = "@VERSION_FULL@"; my $uid = "@UID@"; if (!("--runasroot" ~~ @ARGV) && ($< == 0 || $> == 0)) { @@ -153,7 +154,7 @@ sub cmd_rehash() sub cmd_cron() { - if (getstatus() == 0) { goto &cmd_start(); } + if (getstatus() == 0) { goto &cmd_start(@_); } exit GENERIC_EXIT_UNSPECIFIED; } @@ -167,7 +168,7 @@ sub cmd_restart(@) { cmd_stop(); unlink($pidfile) if (-e $pidfile); - goto &cmd_start; + goto &cmd_start(@_); } sub hid_cheese_sandwich() @@ -203,7 +204,7 @@ sub dev_debug(@) checkgdb(); # If we are still alive here.. Try starting the IRCd.. - exec 'gdb', "--command=$basepath/.gdbargs", '--args', "$binpath/$executable", qw(--nofork --debug), @_; + exec 'gdb', "--command=$scriptpath/.gdbargs", '--args', "$binpath/$executable", qw(--nofork --debug), @_; die "Failed to start GDB: $!\n"; } @@ -222,7 +223,7 @@ sub dev_screendebug(@) # If we are still alive here.. Try starting the IRCd.. print "Starting InspIRCd in `screen`, type `screen -r` when the ircd crashes to view the gdb output and get a backtrace.\n"; print "Once you're inside the screen session press ^C + d to re-detach from the session\n"; - exec qw(screen -m -d gdb), "--command=$basepath/.gdbargs", '-args', "$binpath/$executable", qw(--nofork --debug --nolog), @_; + exec qw(screen -m -d gdb), "--command=$scriptpath/.gdbargs", '-args', "$binpath/$executable", qw(--nofork --debug --nolog), @_; die "Failed to start screen: $!\n"; } @@ -242,7 +243,7 @@ sub dev_valdebug(@) # If we are still alive here.. Try starting the IRCd.. # May want to do something with these args at some point: --suppressions=.inspircd.sup --gen-suppressions=yes # Could be useful when we want to stop it complaining about things we're sure aren't issues. - exec qw(valgrind -v --tool=memcheck --leak-check=yes --db-attach=yes --num-callers=10), "$binpath/$executable", qw(--nofork --debug --nolog), @_; + exec qw(valgrind -v --tool=memcheck --leak-check=yes --db-attach=yes --num-callers=30), "$binpath/$executable", qw(--nofork --debug --nolog), @_; die "Failed to start valgrind: $!\n"; } @@ -276,7 +277,7 @@ sub dev_valdebug_unattended(@) sysopen STDERR, "$valgrindlogpath/valdebug.$suffix", O_WRONLY | O_CREAT | O_NOCTTY | O_APPEND, 0666 or die "Can't open $valgrindlogpath/valdebug.$suffix: $!\n"; # May want to do something with these args at some point: --suppressions=.inspircd.sup --gen-suppressions=yes # Could be useful when we want to stop it complaining about things we're sure aren't issues. - exec qw(valgrind -v --tool=memcheck --leak-check=full --show-reachable=yes --num-callers=15 --track-fds=yes), + exec qw(valgrind -v --tool=memcheck --leak-check=full --show-reachable=yes --num-callers=30 --track-fds=yes), "--suppressions=$binpath/valgrind.sup", qw(--gen-suppressions=all), qw(--leak-resolution=med --time-stamp=yes --log-fd=2 --), "$binpath/$executable", qw(--nofork --debug --nolog), @_; @@ -301,7 +302,7 @@ sub dev_screenvaldebug(@) # If we are still alive here.. Try starting the IRCd.. print "Starting InspIRCd in `screen`, type `screen -r` when the ircd crashes to view the valgrind and gdb output and get a backtrace.\n"; print "Once you're inside the screen session press ^C + d to re-detach from the session\n"; - exec qw(screen -m -d valgrind -v --tool=memcheck --leak-check=yes --db-attach=yes --num-callers=10), "$binpath/$executable", qw(--nofork --debug --nolog), @_; + exec qw(screen -m -d valgrind -v --tool=memcheck --leak-check=yes --db-attach=yes --num-callers=30), "$binpath/$executable", qw(--nofork --debug --nolog), @_; die "Failed to start screen: $!\n"; }