Skip to content

Commit

Permalink
Add systemd service unit
Browse files Browse the repository at this point in the history
  • Loading branch information
tlvince committed Sep 9, 2012
1 parent 070bd77 commit f9a3431
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions redsocks.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[Unit]
Description=Transparent redirector of any TCP connection to proxy using your firewall

[Service]
Type=forking
PIDFile=/var/run/redsocks/redsocks.pid
EnvironmentFile=/etc/conf.d/redsocks
ExecStartPre=/usr/bin/redsocks -t -c $REDSOCKS_CONF
ExecStart=/bin/su -s /bin/sh -c "/usr/bin/redsocks \
-c $REDSOCKS_CONF \
-p /var/run/redsocks/redsocks.pid" redsocks
ExecStopPost=/bin/rm /var/run/redsocks/redsocks.pid
Restart=on-abort

[Install]
WantedBy=multi-user.target

0 comments on commit f9a3431

Please sign in to comment.