Skip to content

Instantly share code, notes, and snippets.

@plamoni
Created December 26, 2011 15:18
Show Gist options
  • Save plamoni/1521378 to your computer and use it in GitHub Desktop.
Save plamoni/1521378 to your computer and use it in GitHub Desktop.
SiriProxy Upstart Script
Some things to note:
I'm running SiriProxy on port 2000 using a non-privileged user. I'm then redirecting internal network traffic
using iptables from port 443 to port 2000. This is more secure than running SiriProxy as root. I also have it
set up to respawn SiriProxy when it dies (which happens pretty regularly). Finally, I'm dumping all the output
to /tmp/siriproxy (in theory), but I don't seem to get output to that log. Which is unfortunate. Maybe someone
can explain what's wrong there. I'm really not an expert in Upstart either. :-)
As usual, simply copying/pasting this stuff anywhere will get you pretty much nowhere. You need to have some idea
what you're doing to make this work. Good luck!
-Pete
-A PREROUTING -s 192.168.2.0/24 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 2000
-A PREROUTING -s 192.168.2.0/24 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 2000
# SiriProxy - a Proxy for Siri
#
# SiriProxy is a fancy proxy that extends the functionality of Siri
description "SiriProxy server"
start on filesystem or runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
exec su -c "/usr/share/ruby-rvm/gems/ruby-1.9.3-p0@SiriProxy/bin/siriproxy server -p 2000" - siriproxyuser >> /tmp/siriproxy2>&1
@tim-hamer
Copy link

Looks like this is probably way out of date, but I had two comments.

  1. If you're running as a non-root user, how do you get the proxy server to start on port 53 without using rvmsudo?
  2. If this really is a copy/paste of your config file, your log probably isn't working because you don't have a space between your logfile name and the redirect command.

Thanks so much for putting this together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment