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 5661240a authored by Leigh B Stoller's avatar Leigh B Stoller

Create syslog/newsyslog stuff for converting idlemail to use syslog.

parent 2afe5e5b
......@@ -12,7 +12,8 @@ my @LOGFILES = ("$LOGDIR/bootinfo.log", "$LOGDIR/tmcd.log",
"$LOGDIR/osselect.log", "$LOGDIR/power.log",
"$LOGDIR/tftpd.log", "$LOGDIR/sdcollectd.log", "$LOGDIR/genlastlog.log",
"$LOGDIR/sshxmlrpc.log", "$LOGDIR/plabgetfree.log", "$LOGDIR/xmlrpcbag.log",
"$LOGDIR/plabrenew.log", "$LOGDIR/sslxmlrpc.log", "$LOGDIR/pubsubd.log");
"$LOGDIR/plabrenew.log", "$LOGDIR/sslxmlrpc.log", "$LOGDIR/pubsubd.log",
"$LOGDIR/idlemail.log");
sub Install($$$)
{
......@@ -101,7 +102,7 @@ sub Install($$$)
"!plabrenew", "*.*\t\t\t\t\t\t$LOGDIR/plabrenew.log",
"!xmlrpcbag", "*.*\t\t\t\t\t\t$LOGDIR/xmlrpcbag.log",
"!sshxmlrpc", "*.*\t\t\t\t\t\t$LOGDIR/sshxmlrpc.log",
"!sslxmlrpc", "*.*\t\t\t\t\t\t$LOGDIR/sslxmlrpc.log");
"!idlemail", "*.*\t\t\t\t\t\t$LOGDIR/idlemail.log");
if ($PROTOGENI_GENIRACK) {
@syslog_lines = (@syslog_lines,
......@@ -164,7 +165,7 @@ sub Install($$$)
"$LOGDIR/plablinkdata.log 640 7 1000 * Z",
"$LOGDIR/xmlrpcbag.log 640 7 300 * Z",
"$LOGDIR/sshxmlrpc.log 640 7 300 * Z",
"$LOGDIR/sslxmlrpc.log 640 7 300 * Z",
"$LOGDIR/idlemail.log 640 14 1000 * Z",
"$LOGDIR/reloadlog 640 9 1000 * Z ".
"/var/run/reload_daemon.pid",
"$LOGDIR/checkuplog 640 9 1000 * Z ".
......
#
# Switch idlemail to use syslog.
#
use strict;
use libinstall;
use installvars;
my $LOGFILE = "$TBROOT/log/idlemail.log";
sub InstallUpdate($$)
{
my ($version, $phase) = @_;
#
# If something should run in the pre-install phase.
#
if ($phase eq "pre") {
Phase "idlemail", "Updating idlemail logging", sub {
Phase "syslog.conf", "Updating $SYSLOG_CONF", sub {
DoneIfEdited($SYSLOG_CONF);
BackUpFileFatal($SYSLOG_CONF);
AppendToFileFatal($SYSLOG_CONF,
"!idlemail", "*.*\t\t\t\t\t\t$LOGDIR/idlemail.log");
};
Phase "logfile", "Creating $LOGFILE", sub {
DoneIfExists($LOGFILE);
CreateFileFatal($LOGFILE);
ExecQuietFatal("$CHGRP tbadmin $LOGFILE");
ExecQuietFatal("$CHMOD 644 $LOGFILE");
};
Phase "newsyslog", "Updating $NEWSYSLOG_CONF", sub {
DoneIfEdited($NEWSYSLOG_CONF);
BackUpFileFatal($NEWSYSLOG_CONF);
AppendToFileFatal($NEWSYSLOG_CONF,
"$LOGFILE 644 14 1000 * Z");
};
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