diff --git a/ulogd.service b/ulogd.service new file mode 100644 index 0000000..8d1a5cd --- /dev/null +++ b/ulogd.service @@ -0,0 +1,18 @@ +[Unit] +Description=Netfilter Userspace Logging Daemon +Before=masq.service + +[Service] +User=root +Group=root +Restart=always +TimeoutSec=0 +Type=forking + +PIDFile=/run/ulog/ulogd.pid +ExecStart=/usr/sbin/ulogd --daemon --uid ulog --pidfile /run/ulog/ulogd.pid +ExecReload=/bin/kill -HUP $MAINPID + +[Install] +WantedBy=sme-server.target multi-user.target + diff --git a/ulogd.spec b/ulogd.spec index 11a042f..4b04421 100644 --- a/ulogd.spec +++ b/ulogd.spec @@ -1,7 +1,7 @@ Summary: Userspace logging daemon for netfilter Name: ulogd Version: 2.0.7 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.netfilter.org/projects/%{name}/ @@ -9,6 +9,8 @@ Source0: http://ftp.netfilter.org/pub/%{name}/%{name}-%{version}.tar.bz2 Source1: %{name}.init Source2: %{name}.logrotate Source3: %{name}2.service +Source4: %{name}.service +Source5: %{name}2.conf BuildRequires: libnetfilter_conntrack-devel >= 0.0.95 BuildRequires: libnetfilter_log-devel >= 1.0.0 @@ -104,24 +106,14 @@ firewall information into an SQLITE database. %{__mkdir_p} -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d/ %{__install} -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} - +%{__install} -m 0644 %{SOURCE4} %{buildroot}/usr/lib/systemd/system/%{name}.service +%{__install} -m 0644 %{SOURCE5} %{buildroot}/usr/lib/tmpfiles.d/%{name}.conf %post -/sbin/chkconfig --add %{name} -/sbin/service %{name} condrestart >/dev/null 2>&1 || : %preun -# if we are uninstalling... -if [ "$1" = 0 ]; then - /sbin/service %{name} stop > /dev/null 2>&1 ||: - /sbin/chkconfig --del %{name} -fi %postun -# if we are upgrading... -if [ "$1" -ge "1" ]; then - /sbin/service %{name} condrestart >/dev/null 2>&1 || : -fi %check %{__make} %{?_smp_mflags} check @@ -179,6 +171,10 @@ fi %doc COPYING %changelog +* Wed Apr 17 2024 Jean-Philippe Pialasse 2.0.7-2.sme +- adding systemd service file and run config [SME: 12538] + remove scriptlet for sysvinit, leave integrator enabling service + * Fri Jul 14 2023 BogusDateBot - Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, by assuming the date is correct and changing the weekday. diff --git a/ulogd2.conf b/ulogd2.conf new file mode 100644 index 0000000..2ec73b4 --- /dev/null +++ b/ulogd2.conf @@ -0,0 +1 @@ +d /run/ulog 2755 ulog ulog