~niedbalski/charms/precise/rsyslog-forwarder/lp-1323627

« back to all changes in this revision

Viewing changes to hooks/config-changed

  • Committer: Marco Ceppi
  • Date: 2012-10-25 17:04:19 UTC
  • mfrom: (5.1.5 rsyslog-forwarder)
  • Revision ID: marco@ceppi.net-20121025170419-jwot1m302if0he64
Add local logging for services

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
keep_logs=`config-changed log-locally`
 
4
keep_logs=${keep_logs,,}
 
5
 
 
6
if [ "$keep_logs" == "true" ]; then
 
7
        install -o root -g root -m 0644 files/keep_local.template /etc/rsyslog.d/81-local.conf
 
8
else
 
9
        rm -f /etc/rsyslog.d/81-local.conf
 
10
fi
 
11
 
 
12
service rsyslog restart