Browse files

Replace 'su' cruft with systemd's 'User='

See systemd.exec(5)
  • Loading branch information...
1 parent 7783402 commit b1cf7c473d072ee12105777fb85fd0d0d5d9c04d @tlvince tlvince committed Feb 13, 2013
Showing with 5 additions and 5 deletions.
  1. +5 −5 redsocks.service
View
10 redsocks.service
@@ -3,13 +3,13 @@ Description=Transparent redirector of any TCP connection to proxy using your fir
[Service]
Type=forking
-PIDFile=/var/run/redsocks/redsocks.pid
+PIDFile=/run/redsocks/redsocks.pid
EnvironmentFile=/etc/conf.d/redsocks
+User=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
+ExecStart=/usr/bin/redsocks -c $REDSOCKS_CONF \
+ -p /run/redsocks/redsocks.pid
+ExecStopPost=/bin/rm /run/redsocks/redsocks.pid
Restart=on-abort
[Install]

0 comments on commit b1cf7c4

Please sign in to comment.