From 3644883aa8f87a54fcbca1dfc737e40e12e18a19 Mon Sep 17 00:00:00 2001 From: Andrei Belov Date: Wed, 25 Sep 2019 15:28:20 +0300 Subject: Packages: added logrotate configuration for Debian packages. While here, made logrotate configuration consistent between rpm and deb. This closes #323 issue on GitHub. --- pkg/deb/debian/unit.logrotate | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 pkg/deb/debian/unit.logrotate (limited to 'pkg/deb/debian') diff --git a/pkg/deb/debian/unit.logrotate b/pkg/deb/debian/unit.logrotate new file mode 100644 index 00000000..416947ca --- /dev/null +++ b/pkg/deb/debian/unit.logrotate @@ -0,0 +1,15 @@ +/var/log/unit.log { + daily + missingok + rotate 7 + compress + delaycompress + nocreate + notifempty + su root root + postrotate + if [ -f /var/run/unit.pid ]; then + /bin/kill -SIGUSR1 `cat /var/run/unit.pid` + fi + endscript +} -- cgit From 919230a21e9d5f2b6edcf99e1938707d487639a2 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Wed, 25 Sep 2019 16:18:19 +0300 Subject: Packaging: debian: changed NAME in the init script This fixes the following issues: - inability to stop unit daemon - default configuration from /etc/default/unit are not propagated to the daemon --- pkg/deb/debian/unit.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg/deb/debian') diff --git a/pkg/deb/debian/unit.init b/pkg/deb/debian/unit.init index 2f573f99..93e9b731 100644 --- a/pkg/deb/debian/unit.init +++ b/pkg/deb/debian/unit.init @@ -13,7 +13,7 @@ ### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/unitd -NAME=unitd +NAME=unit DESC=unitd [ -r /etc/default/${NAME} ] && . /etc/default/${NAME} -- cgit From 5c6b01d76c329f4ddcc31378e4ec62123e804d01 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Wed, 25 Sep 2019 16:19:31 +0300 Subject: Packaging: debian: drop a surplus line from init script --- pkg/deb/debian/unit.init | 2 -- 1 file changed, 2 deletions(-) (limited to 'pkg/deb/debian') diff --git a/pkg/deb/debian/unit.init b/pkg/deb/debian/unit.init index 93e9b731..900e97fd 100644 --- a/pkg/deb/debian/unit.init +++ b/pkg/deb/debian/unit.init @@ -16,8 +16,6 @@ DAEMON=/usr/sbin/unitd NAME=unit DESC=unitd -[ -r /etc/default/${NAME} ] && . /etc/default/${NAME} - #includes lsb functions . /lib/lsb/init-functions -- cgit