All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit daea075c authored by Leigh B Stoller's avatar Leigh B Stoller

Add syslog stuff for the rfmonitor.

parent 96c0250b
......@@ -124,12 +124,26 @@ if (! $impotent) {
}
}
#
# Setup a signal handler for newsyslog.
#
sub handler()
{
my $SAVEEUID = $EUID;
$EUID = 0;
ReOpenLog($LOGFILE);
$EUID = $SAVEEUID;
}
$SIG{HUP} = \&handler
if (! ($debug || $impotent));
#
# Bind a socket for incoming connections, we expect a new connection for
# each report.
#
my $ServerSocket =
new IO::Socket::INET(LocalHost => '0.0.0.0',
new IO::Socket::INET(LocalHost => $HOST,
LocalPort => $PORT,
Proto => 'tcp',
Listen => 10,
......
#
# APT logs.
#
use strict;
use libinstall;
use installvars;
sub InstallUpdate($$)
{
my ($version, $phase) = @_;
#
# If something should run in the pre-install phase.
#
if ($phase eq "pre") {
Phase "setup", "Adding apt logging", sub {
Phase "newsyslog", "Updating $NEWSYSLOG_CONF", sub {
DoneIfEdited($NEWSYSLOG_CONF);
BackUpFileFatal($NEWSYSLOG_CONF);
AppendToFileFatal($NEWSYSLOG_CONF,
"$LOGDIR/rfmonitor_daemon.log 644 7 1000 * Z ".
"/var/run/rfmonitor_daemon.pid");
};
Phase "syslogd", "Restarting syslogd", sub {
HUPDaemon("syslog");
};
};
}
#
# If something should run in the post-install phase.
#
if ($phase eq "post") {
}
return 0;
}
1;
# Local Variables:
# mode:perl
# End:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment