diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-24 05:21:00 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-07-24 05:21:00 +0000 |
commit | 3635a9497d9c56b236be6ab643d8dd92f4988d16 (patch) | |
tree | 5cc55f8f21a29fae700aaf3f72481c7f7bdd8c2e | |
parent | 58c99ecfe63b3fbe550cd16c2337962857bb73ff (diff) |
Build the logrotate script according to paths
(Closes issue #13147)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@133400 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | contrib/scripts/asterisk.logrotate | 6 |
2 files changed, 6 insertions, 4 deletions
@@ -762,7 +762,9 @@ install-logrotate: if [ ! -d $(ASTETCDIR)/../logrotate.d ]; then \ mkdir $(ASTETCDIR)/../logrotate.d ; \ fi - install -m 0644 contrib/scripts/asterisk.logrotate $(ASTETCDIR)/../logrotate.d/asterisk + sed 's#__LOGDIR__#$(ASTLOGDIR)#g' < contrib/scripts/asterisk.logrotate | sed 's#__SBINDIR__#$(ASTSBINDIR)#g' > contrib/scripts/asterisk.logrotate.tmp + install -m 0644 contrib/scripts/asterisk.logrotate.tmp $(ASTETCDIR)/../logrotate.d/asterisk + rm -f contrib/scripts/asterisk.logrotate.tmp config: @if [ "${OSARCH}" = "linux-gnu" ]; then \ diff --git a/contrib/scripts/asterisk.logrotate b/contrib/scripts/asterisk.logrotate index f83257060..92e6548e7 100644 --- a/contrib/scripts/asterisk.logrotate +++ b/contrib/scripts/asterisk.logrotate @@ -1,4 +1,4 @@ -/var/log/asterisk/debug /var/log/asterisk/console /var/log/asterisk/full /var/log/asterisk/debug /var/log/asterisk/*log { +__LOGDIR__/debug __LOGDIR__/console __LOGDIR__/full __LOGDIR__/messages __LOGDIR__/*log { weekly missingok rotate 52 @@ -8,6 +8,6 @@ create 640 root root sharedscripts postrotate - /usr/sbin/asterisk -rx 'logger reload' > /dev/null 2> /dev/null + __SBINDIR__/asterisk -rx 'logger reload' > /dev/null 2> /dev/null endscript -}
\ No newline at end of file +} |