Skip to content

Commit

Permalink
removed references to rdio configs (updated rdioConfig.js to localCon…
Browse files Browse the repository at this point in the history
…fig.js)

improved $NODE_BIN searching
  • Loading branch information
Stephen Koenig committed Apr 27, 2012
1 parent 980b582 commit d59d01d
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 19 deletions.
7 changes: 7 additions & 0 deletions 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)
Expand Down
2 changes: 1 addition & 1 deletion 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
Expand Down
File renamed without changes.
15 changes: 7 additions & 8 deletions 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
15 changes: 7 additions & 8 deletions debian/statsd.init
Expand Up @@ -2,21 +2,20 @@

# 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
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

Expand Down
2 changes: 1 addition & 1 deletion 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
2 changes: 1 addition & 1 deletion debian/statsd.upstart
@@ -1,5 +1,5 @@
description "statsd"
author "rdio"
author "etsy"

start on startup
stop on shutdown
Expand Down

0 comments on commit d59d01d

Please sign in to comment.