2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-21 19:22:05 +00:00

Add default logrotate configuration for gocons

Add logrotate conf for the console log files and log
of goconserver.
This commit is contained in:
chenglch 2018-03-27 12:02:20 +08:00
parent a9ce890a6c
commit 2ac315cbe2
6 changed files with 18 additions and 0 deletions

View File

@ -8,6 +8,7 @@ opt/xcat/share/xcat/netboot
opt/xcat/share/xcat/templates
opt/xcat/share/xcat/ca
opt/xcat/share/xcat/scripts
opt/xcat/share/xcat/conf
opt/xcat/share/xcat/tools
opt/xcat/share/xcat/rollupdate
opt/xcat/share/xcat/installp_bundles

View File

@ -6,6 +6,7 @@ share/xcat/mypostscript/* opt/xcat/share/xcat/mypostscript/
share/xcat/ca/* opt/xcat/share/xcat/ca
share/xcat/scripts/* opt/xcat/share/xcat/scripts
share/xcat/conf/* opt/xcat/share/xcat/conf
share/xcat/tools/* opt/xcat/share/xcat/tools
share/xcat/rollupdate/* opt/xcat/share/xcat/rollupdate
share/xcat/installp_bundles/* opt/xcat/share/xcat/installp_bundles

View File

@ -47,6 +47,7 @@ binary-arch:
chmod 755 $(rootdir)/bin/*
chmod 755 $(rootdir)/sbin/*
chmod 644 $(rootdir)/share/xcat/ca/*
chmod 644 $(rootdir)/share/xcat/conf/*
chmod 755 $(rootdir)/share/xcat/cons/*
chmod 755 $(rootdir)/share/xcat/ib/*
chmod 755 $(rootdir)/share/xcat/ib/netboot/sles/*

View File

@ -6,6 +6,7 @@ BEGIN {
}
use lib "$::XCATROOT/lib/perl";
use strict;
use File::Copy;
use xCAT::Table;
use xCAT::Utils;
use xCAT::TableUtils;
@ -165,6 +166,9 @@ sub start_goconserver {
xCAT::MsgUtils->error_message("Failed to create configuration file for goconserver.", $::callback);
return 1;
}
if (!copy($::XCATROOT."/share/xcat/conf/goconslogrotate", "/etc/logrotate.d/goconserver")) {
xCAT::MsgUtils->warn_message("Failed to create logrotate configuration for goconserver.", $::callback);
}
}
$ret = xCAT::Goconserver::restart_service();
if ($ret) {

View File

@ -0,0 +1,9 @@
/var/log/consoles/*.log
/var/log/goconserver/server.log
{
missingok
sharedscripts
postrotate
kill -HUP `systemctl show -p MainPID goconserver.service 2> /dev/null |awk -F= '{print $2}'` 2> /dev/null || true
endscript
}

View File

@ -100,6 +100,7 @@ mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/scripts
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/samples
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/tools
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/cons
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/conf
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/rollupdate
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/installp_bundles
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/image_data
@ -145,6 +146,7 @@ chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/xcat/ca/*
cp share/xcat/mypostscript/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/mypostscript
cp share/xcat/scripts/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/scripts
cp share/xcat/conf/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/conf
cp share/xcat/samples/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/samples
cp -r share/xcat/tools/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/tools
cp -r share/xcat/hamn/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/hamn