Commit a8d99d92 by Cédric de Saint Martin

Add logrotate service to deb/rpm slapos-node package

1 parent babcb576
......@@ -53,8 +53,9 @@ osc add slapos.spec
# Add entry to changelog
cd $TEMPLATES_DIRECTORY/debian
dch -pm -v $VERSION+$RECIPE_VERSION+$RELEASE --check-dirname-level=0 "New version of slapos ($VERSION+$RECIPE_VERSION+$RELEASE)"
# Add cronfile
# Add cron and logrotate files
cp $CURRENT_DIRECTORY/$SLAPOS_ORGINAL_DIRECTORY/template/slapos-node.cron.d $TEMPLATES_DIRECTORY/debian/cron.d
cp $CURRENT_DIRECTORY/$SLAPOS_ORGINAL_DIRECTORY/template/slapos-node.logrotate $TEMPLATES_DIRECTORY/debian/slapos-node.logrotate
cd $TEMPLATES_DIRECTORY
tar -czf debian.tar.gz debian
cd $OBS_DIRECTORY
......
# Generated by SlapOS. Assumes that slapos is installed in default location.
/opt/slapos/slapos-software.log /opt/slapos/slapos-instance.log /opt/slapos/slapos-report.log {
compress
dateext
daily
rotate 14
missingok
notifempty
create 640 root root
sharedscripts
endscript
}
/opt/slapos/slapos-format.log {
compress
dateext
daily
rotate 100
missingok
notifempty
create 640 root root
sharedscripts
endscript
}
......@@ -65,6 +65,7 @@ binary-arch: build install
# dh_installmime
dh_installinit
dh_installcron
dh_installlogrotate
dh_installman
dh_installinfo
# dh_undocumented
......
......@@ -86,6 +86,8 @@ cd $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_numb
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p $RPM_BUILD_ROOT/etc/cron.d/
cp $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}/template/slapos-node.cron.d $RPM_BUILD_ROOT/etc/cron.d/slapos-node
mkdir -p $RPM_BUILD_ROOT/etc/logrotate.d/
cp $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}/template/slapos-node.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/slapos.logrotate.conf
mkdir -p $RPM_BUILD_ROOT/etc/systemd/system/
cp $RPM_BUILD_DIR/slapos-node_%{unmangled_version}+%{slapversion}+%{release_number}/template/slapos-node.service %{buildroot}/etc/systemd/system/
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!