| 12345678910111213141516171819202122232425262728293031323334 |
- [Unit]
- Description=Start websockify
- After=multi-user.target
-
- [Service]
- Type=simple
-
- User=www-data
- Group=www-data
-
- Environment=LISTEN_HOST=127.0.0.1
- Environment=LISTEN_PORT=5800
- Environment=TARGET_HOST=127.0.0.1
- Environment=TARGET_PORT=5900
- #EnvironmentFile=/etc/default/websockify
-
- PermissionsStartOnly=true
- ExecStartPre=/bin/sh -c '\
- touch /var/run/websockify.pid; \
- chown www-data:www-data /var/run/websockify.pid'
- WorkingDirectory=/tmp
- ExecStart=/usr/bin/websockify \
- ${LISTEN_HOST}:${LISTEN_PORT} \
- ${TARGET_HOST}:${TARGET_PORT}
-
- NoNewPrivileges=true
- RestartSec=5
- Restart=on-failure
-
-
- [Install]
- WantedBy=multi-user.target
-
|