~jjo/charms/precise/rsyslog-forwarder/fix-config-changed-and-other-mv-usages

« back to all changes in this revision

Viewing changes to hooks/config-changed

  • Committer: JuanJo Ciarlante
  • Date: 2013-01-24 11:57:05 UTC
  • Revision ID: jjo@canonical.com-20130124115705-uuk5qbh9y0f8suii
fix config-changed to use "config-get log-locally" (looks like the orig. intention); protect "mv -f" with file presence test, as it will still exit with failure if not (also use {} shell expansions to shorten cmdline)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/bash
2
2
 
3
 
keep_logs=`config-changed log-locally`
 
3
keep_logs=`config-get log-locally`
4
4
keep_logs=${keep_logs,,}
5
5
 
6
6
if [ "$keep_logs" == "true" ]; then