Skip to content

Instantly share code, notes, and snippets.

@voodoojello
Created May 4, 2014 04:11
Show Gist options
  • Save voodoojello/9eaa6106fb45b98eed67 to your computer and use it in GitHub Desktop.
Save voodoojello/9eaa6106fb45b98eed67 to your computer and use it in GitHub Desktop.
NxFilter Upstart Config
#
# nxfilter.conf - NxFilter Upstart Config
# modified: Sun Apr 27 15:59:13 CDT 2014
# Mark Page [m.e.page_at_gmail.com]
#
description "NxFilter"
author "Mark Page [m.e.page_at_gmail.com]"
#
# Note: Upstart event logging for most Debian-based
# distros (e.g., Ubuntu 6.x and up) can be found in
# /var/log/upstart/[name].log. For this application,
# that would be /var/log/upstart/nxfilter.log.
#
#
# Make sure we've got network connectivity (other
# than loopback) before starting the service
#
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [016]
#
# Default path set to /opt/nxfilter, with the default
# java heap size set to 512m. These settings can be
# adjusted as needed here.
#
env NX_HOME=/opt/nxfilter
env JVM_HEAP="512m"
#
# Respawn the exec should it crash, but stop if
# it respawns more than 10 times in 5 seconds
#
respawn
respawn limit 10 5
script
NX_START="-Djava.net.preferIPv4Stack=true -Xmx$JVM_HEAP -Djava.security.egd=file:/dev/./urandom -cp $NX_HOME/nxd.jar:$NX_HOME//lib/*: nxd.Main"
cd $NX_HOME
exec /usr/bin/java $NX_START
emits nxfilter_running
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment