From 15d147ba30531b9c567512f18bce6e6ad550a21a Mon Sep 17 00:00:00 2001 From: Bruno Clermont Date: Fri, 2 Sep 2011 13:07:11 -0400 Subject: [PATCH] Move log output to /var/log/statsd logging in /tmp is not a good idea, it's dangerous and not persitent in many cases (/tmp mount in tmpfs or wiped at host startup). --- debian/dirs | 1 + debian/postinst | 6 ++++++ debian/scripts/start | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 debian/dirs create mode 100755 debian/postinst diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 00000000..4778ce6a --- /dev/null +++ b/debian/dirs @@ -0,0 +1 @@ +var/log/statsd \ No newline at end of file diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 00000000..dc2c0615 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ "`stat -c %G /var/log/statsd`" != 'nogroup' ]; then + chown root.nogroup /var/log/statsd + chmod 770 /var/log/statsd +fi \ No newline at end of file diff --git a/debian/scripts/start b/debian/scripts/start index 5e9149f5..ed09fcbd 100755 --- a/debian/scripts/start +++ b/debian/scripts/start @@ -1,3 +1,3 @@ #!/bin/sh # Called by Upstart, /etc/init/statsd.conf -/usr/bin/nodejs /usr/share/statsd/stats.js /etc/statsd/rdioConfig.js 2>&1 >> /tmp/statsd.log +/usr/bin/nodejs /usr/share/statsd/stats.js /etc/statsd/rdioConfig.js 2>&1 >> /var/log/statsd/statsd.log