Skip to content

Instantly share code, notes, and snippets.

@Chealion
Created April 26, 2014 15:11
Show Gist options
  • Save Chealion/11322531 to your computer and use it in GitHub Desktop.
Save Chealion/11322531 to your computer and use it in GitHub Desktop.
#!/bin/sh
echo "This job runs via upstart, invoking upstart now..."
exec initctl $1 iperf
description "IPERF"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
respawn
umask 022
#nice
#chroot /
#chdir /home/ubuntu
#limit core <softlimit> <hardlimit>
#limit cpu <softlimit> <hardlimit>
#limit data <softlimit> <hardlimit>
#limit fsize <softlimit> <hardlimit>
#limit memlock <softlimit> <hardlimit>
#limit msgqueue <softlimit> <hardlimit>
#limit nice <softlimit> <hardlimit>
#limit nofile <softlimit> <hardlimit>
#limit nproc <softlimit> <hardlimit>
#limit rss <softlimit> <hardlimit>
#limit rtprio <softlimit> <hardlimit>
#limit sigpending <softlimit> <hardlimit>
#limit stack <softlimit> <hardlimit>
setuid ubuntu
setgid ubuntu
console log # log stdout/stderr to /var/log/upstart/
exec /usr/bin/iperf -f m -s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment