summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2016-09-18 17:47:34 -0400
committerMike Gilbert <floppym@gentoo.org>2016-09-18 17:48:05 -0400
commit3d6a8bd065528aa255a7e409c05474b5910c574f (patch)
treea7c657583297d3352c51bdaa8ae52d48bdaf90f3 /net-misc
parentsci-biology/abyss: bump up to 1.9.0, tweak for gcc-6, bug #594254 (diff)
downloadgentoo-3d6a8bd065528aa255a7e409c05474b5910c574f.tar.gz
gentoo-3d6a8bd065528aa255a7e409c05474b5910c574f.tar.bz2
gentoo-3d6a8bd065528aa255a7e409c05474b5910c574f.zip
net-misc/asterisk: make logrotate file work with systemd
Patch by Karsten Kretschmer. Bug: https://bugs.gentoo.org/593276 Package-Manager: portage-2.3.0_p36
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/asterisk/asterisk-11.21.1-r1.ebuild (renamed from net-misc/asterisk/asterisk-11.21.1.ebuild)0
-rw-r--r--net-misc/asterisk/asterisk-13.11.2-r1.ebuild (renamed from net-misc/asterisk/asterisk-13.11.2.ebuild)0
-rw-r--r--net-misc/asterisk/files/1.6.2/asterisk.logrotate46
3 files changed, 4 insertions, 2 deletions
diff --git a/net-misc/asterisk/asterisk-11.21.1.ebuild b/net-misc/asterisk/asterisk-11.21.1-r1.ebuild
index 97fa07110c57..97fa07110c57 100644
--- a/net-misc/asterisk/asterisk-11.21.1.ebuild
+++ b/net-misc/asterisk/asterisk-11.21.1-r1.ebuild
diff --git a/net-misc/asterisk/asterisk-13.11.2.ebuild b/net-misc/asterisk/asterisk-13.11.2-r1.ebuild
index bd5e6c37a344..bd5e6c37a344 100644
--- a/net-misc/asterisk/asterisk-13.11.2.ebuild
+++ b/net-misc/asterisk/asterisk-13.11.2-r1.ebuild
diff --git a/net-misc/asterisk/files/1.6.2/asterisk.logrotate4 b/net-misc/asterisk/files/1.6.2/asterisk.logrotate4
index 857a970b3aa4..29e78eb16064 100644
--- a/net-misc/asterisk/files/1.6.2/asterisk.logrotate4
+++ b/net-misc/asterisk/files/1.6.2/asterisk.logrotate4
@@ -3,7 +3,8 @@
notifempty
postrotate
- /etc/init.d/asterisk --quiet status && /usr/sbin/asterisk -rnx "logger reload" || /bin/true
+ test -e /run/openrc/softlevel && /etc/init.d/asterisk --quiet status && /usr/sbin/asterisk -rnx "logger reload" || /bin/true
+ test -e /run/systemd/system && systemctl is-active --quiet asterisk.service && /usr/sbin/asterisk -rnx "logger reload" || /bin/true
endscript
}
@@ -13,7 +14,8 @@
daily
postrotate
- /etc/init.d/asterisk --quiet status && /usr/sbin/asterisk -rnx "logger reload" || /bin/true
+ test -e /run/openrc/softlevel && /etc/init.d/asterisk --quiet status && /usr/sbin/asterisk -rnx "logger reload" || /bin/true
+ test -e /run/systemd/system && systemctl is-active --quiet asterisk.service && /usr/sbin/asterisk -rnx "logger reload" || /bin/true
endscript
}