This repository has been archived by the owner on Dec 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from mikkoc/master
Add support for Amazon Linux
- Loading branch information
Showing
3 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,4 @@ | |
|
||
supports 'ubuntu' | ||
supports 'centos', '~> 6.0' | ||
supports 'amazon' |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# statsd - Network daemon for aggregating statistics | ||
# | ||
# This is a network service that receives metric data via UDP from other | ||
# applications. It aggregates this data and flushes it to a storage backend | ||
# (typically Graphite) at regular intervals. | ||
# | ||
description "Network daemon for aggregating statistics" | ||
author "Librato" | ||
|
||
start on (local-filesystems and net-device-up IFACE!=lo) | ||
|
||
respawn | ||
respawn limit 10 5 | ||
|
||
chdir <%= node['statsd']['path'] %> | ||
|
||
pre-start script | ||
NODE_BIN=$(which nodejs || which node) | ||
[ -n $NODE_BIN ] || { stop; exit 0; } | ||
end script | ||
|
||
script | ||
NODE_BIN=$(which nodejs || which node) | ||
su -s /bin/sh -c 'exec "$0" "$@"' <%= node['statsd']['user'] %> -- $NODE_BIN stats.js <%= node['statsd']['config_dir'] %>/config.js 2>&1 >> <%= node['statsd']['log_file'] %> | ||
end script |