Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
8 additions
and
20 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 |
---|---|---|
@@ -1,25 +1,13 @@ | ||
# cat /etc/init/transloaditapi2.conf | ||
# http://upstart.ubuntu.com/wiki/Stanzas | ||
# Upstart script | ||
# /etc/init/wetty.conf | ||
|
||
description "Transloadit.com node.js API 2" | ||
author "kvz" | ||
description "Web TTY" | ||
author "Wetty" | ||
|
||
start on started network | ||
stop on stopping network | ||
|
||
stop on shutdown | ||
respawn | ||
respawn limit 20 5 | ||
|
||
# Max open files are @ 1024 by default. Bit few. | ||
limit nofile 32768 32768 | ||
|
||
script | ||
set -e | ||
mkfifo /tmp/api2-log-fifo | ||
( logger -t api2 </tmp/api2-log-fifo & ) | ||
exec >/tmp/api2-log-fifo | ||
rm /tmp/api2-log-fifo | ||
exec sudo -u www-data MASTERKEY=`cat /transloadit/keys/masterkey` /transloadit/bin/server 2>&1 | ||
end script | ||
|
||
post-start script | ||
/transloadit/bin/notify.sh 'API2 Just started' | ||
end script | ||
exec wetty -p 3000 |