daemon: Add a logrotate configuration file.
This commit is contained in:
parent
52e75bea3b
commit
18039a2564
4 changed files with 28 additions and 1 deletions
|
@ -75,6 +75,9 @@ EXAMPLE_SERVICES_FILES = \
|
|||
coreexservicesdir = $(coreexdir)/services
|
||||
dist_coreexservices_DATA= $(EXAMPLE_SERVICES_FILES)
|
||||
|
||||
LOGROTATE_DIR = $(sysconfdir)/logrotate.d
|
||||
LOGROTATE_FILE = data/core-daemon.logrotate
|
||||
|
||||
# Python package build
|
||||
noinst_SCRIPTS = build
|
||||
build:
|
||||
|
@ -84,6 +87,14 @@ build:
|
|||
install-exec-hook:
|
||||
$(PYTHON) $(SETUPPY) $(SETUPPYFLAGS) install --prefix=${DESTDIR}/${pyprefix} --install-purelib=${DESTDIR}/${pythondir} --install-platlib=${DESTDIR}/${pyexecdir} --no-compile
|
||||
|
||||
install-data-local:
|
||||
$(MKDIR_P) $(DESTDIR)$(LOGROTATE_DIR)
|
||||
$(INSTALL_DATA) $(LOGROTATE_FILE) \
|
||||
$(DESTDIR)$(LOGROTATE_DIR)/`basename $(LOGROTATE_FILE) .logrotate`
|
||||
|
||||
uninstall-local:
|
||||
rm -f $(DESTDIR)$(LOGROTATE_DIR)/`basename $(LOGROTATE_FILE) .logrotate`
|
||||
|
||||
# Python package uninstall
|
||||
uninstall-hook:
|
||||
rm -f ${pythondir}/core_python-${COREDPY_VERSION}-py${PYTHON_VERSION}.egg-info
|
||||
|
@ -94,6 +105,7 @@ uninstall-hook:
|
|||
rmdir -p $(coreexmyservicesdir) || true
|
||||
rmdir -p $(coreexdir) || true
|
||||
rmdir -p $(coreconfdir) || true
|
||||
rmdir -p $(LOGROTATE_DIR) || true
|
||||
|
||||
# Python package cleanup
|
||||
clean-local:
|
||||
|
@ -112,4 +124,4 @@ DISTCLEANFILES = Makefile.in core/*.pyc MANIFEST doc/Makefile.in doc/Makefile \
|
|||
doc/conf.py core/addons/*.pyc
|
||||
|
||||
# files to include with distribution tarball
|
||||
EXTRA_DIST = $(SETUPPY) MANIFEST.in CORE.e4p core doc
|
||||
EXTRA_DIST = $(SETUPPY) MANIFEST.in CORE.e4p core doc $(LOGROTATE_FILE)
|
||||
|
|
13
daemon/data/core-daemon.logrotate
Normal file
13
daemon/data/core-daemon.logrotate
Normal file
|
@ -0,0 +1,13 @@
|
|||
/var/log/core-daemon.log {
|
||||
rotate 7
|
||||
daily
|
||||
missingok
|
||||
notifempty
|
||||
compress
|
||||
sharedscripts
|
||||
postrotate
|
||||
if [ -r /var/run/core-daemon.pid ]; then
|
||||
kill -USR1 $(cat /var/run/core-daemon.pid) > /dev/null 2>&1
|
||||
fi
|
||||
endscript
|
||||
}
|
|
@ -20,3 +20,4 @@
|
|||
# ATpythondirAT is expanding to ${prefix}/lib/python2.7/dist-packages
|
||||
/usr/lib/python2.7/dist-packages
|
||||
/etc/init.d
|
||||
/etc/logrotate.d
|
||||
|
|
|
@ -302,6 +302,7 @@ sed -i 's/emane_realtime = True/emane_realtime = False/' /etc/core/core.conf
|
|||
%doc %{_mandir}/man1/netns.1.gz
|
||||
%doc %{_mandir}/man1/vcmd.1.gz
|
||||
%doc %{_mandir}/man1/vnoded.1.gz
|
||||
/etc/logrotate.d/core-daemon
|
||||
/etc/systemd/system/core-daemon.service
|
||||
%{python_sitearch}/core_python_netns-1.0-py%{python_version}.egg-info
|
||||
%{python_sitearch}/netns.so
|
||||
|
|
Loading…
Reference in a new issue