Verlihub.service
Jump to navigation
Jump to search
[Unit]
Description=Verlihub DC Server
After=network.target
[Service]
Type=forking
PermissionsStartOnly=false
WorkingDirectory=/home/hub/verlihubas
ExecStartPre=+/bin/sh -c "/usr/sbin/iptables -A PREROUTING -t nat -i wan0 -p tcp --dport 411 -j REDIRECT --to-port 4111"
ExecStart=/home/hub/verlihubas/bin/vh -r ./config
ExecStop=/home/hub/verlihubas/bin/vh -s ./config
ExecReload=/home/hub/verlihubas/bin/vh -q ./config
ExecStopPost=+/bin/sh -c "/usr/sbin/iptables -D PREROUTING -t nat -i wan0 -p tcp --dport 411 -j REDIRECT --to-port 4111"
User=hub
Group=hub
Restart=always
[Install]
WantedBy=multi-user.target