Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #75 from heph/master

improved debian init scripts
  • Loading branch information...
commit 6f0e246620a34402ed1da36e5dc44398bcf80dd4 2 parents 980b582 + d59d01d
@mrtazz mrtazz authored
View
7 debian/changelog
@@ -1,3 +1,10 @@
+statsd (0.0.3) unstable; urgency=low
+
+ * removed rdio references from init scripts and config
+ * improved searching for the nodejs binary
+
+ -- Stephen Koenig <heph@bittorrent.com> Thu, 26 Apr 2012 18:24:00 -0800
+
statsd (0.0.2) unstable; urgency=low
* merge of pull request #34 (from bruno@sologroup.gs)
View
2  debian/control
@@ -1,7 +1,7 @@
Source: statsd
Section: devel
Priority: optional
-Maintainer: Manish Singh <manish@rd.io>
+Maintainer: Stephen Koenig <heph@bittorrent.com>
Standards-Version: 3.9.1
Package: statsd
View
0  debian/rdioConfig.js → debian/localConfig.js
File renamed without changes
View
15 debian/scripts/start
@@ -1,12 +1,11 @@
#!/bin/sh
-if [ -x /usr/bin/nodejs ]; then
- NODE_BIN=/usr/bin/nodejs
-elif [ -x /usr/bin/node ]; then
- NODE_BIN=/usr/bin/node
-else
- echo "Can't find /usr/bin/nodejs or /usr/bin/node"
- exit 1
+PATH=$PATH:/usr/local/bin:/usr/bin:/bin
+NODE_BIN=$(which nodejs||which node)
+
+if [ ! -x "$NODE_BIN" ]; then
+ echo "Can't find executable nodejs or node in PATH=$PATH"
+ exit 1
fi
-$NODE_BIN /usr/share/statsd/stats.js /etc/statsd/rdioConfig.js 2>&1 >> /var/log/statsd/statsd.log
+$NODE_BIN /usr/share/statsd/stats.js /etc/statsd/localConfig.js 2>&1 >> /var/log/statsd/statsd.log
View
15 debian/statsd.init
@@ -2,13 +2,12 @@
# Do NOT "set -e"
-if [ -x /usr/bin/nodejs ]; then
- NODE_BIN=/usr/bin/nodejs
-elif [ -x /usr/bin/node ]; then
- NODE_BIN=/usr/bin/node
-else
- echo "Can't find /usr/bin/nodejs or /usr/bin/node"
- exit 1
+PATH=$PATH:/usr/local/bin:/usr/bin:/bin
+NODE_BIN=$(which nodejs||which node)
+
+if [ ! -x "$NODE_BIN" ]; then
+ echo "Can't find executable nodejs or node in PATH=$PATH"
+ exit 1
fi
# PATH should only include /usr/* if it runs after the mountnfs.sh script
@@ -16,7 +15,7 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="StatsD"
NAME=statsd
DAEMON=$NODE_BIN
-DAEMON_ARGS="/usr/share/statsd/stats.js /etc/statsd/rdioConfig.js 2>&1 >> /var/log/statsd/statsd.log "
+DAEMON_ARGS="/usr/share/statsd/stats.js /etc/statsd/localConfig.js 2>&1 >> /var/log/statsd/statsd.log "
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
View
2  debian/statsd.install
@@ -1,4 +1,4 @@
stats.js /usr/share/statsd
config.js /usr/share/statsd
-debian/rdioConfig.js /etc/statsd
+debian/localConfig.js /etc/statsd
debian/scripts/start /usr/share/statsd/scripts
View
2  debian/statsd.upstart
@@ -1,5 +1,5 @@
description "statsd"
-author "rdio"
+author "etsy"
start on startup
stop on shutdown
Please sign in to comment.
Something went wrong with that request. Please try again.