# SIP_client-upstart
# starts SIP_client on startup by using xinit.
# by default runs as dispatcher, to change edit below.
env USER=dispatcher

description     "SIP_client-upstart-script"
author          "Alex Mogilnikov"

start on (filesystem and stopped udevtrigger)
stop on runlevel [016]

# tell upstart to respawn the process if abnormal exit
respawn
respawn limit 10 5
limit nice 21 21

script
exec su -c "xinit /usr/bin/java -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -jar /usr/local/share/SIP_client/SIP_client.jar -- /usr/bin/X -s 0 -bs -nolisten tcp :0" $USER
end script
