-
Notifications
You must be signed in to change notification settings - Fork 72
Running as a socket‐activated service with systemd
Snawoot edited this page Mar 26, 2024
·
3 revisions
opera-proxy.service
:
[Unit]
Description=Opera VPN
Documentation=https://github.com/Snawoot/opera-proxy/
After=network.target network-online.target
Requires=network-online.target
BindsTo=proxy2opera-proxy.service
[Service]
EnvironmentFile=/opt/opera-proxy/opera-proxy.conf
ExecStart=/opt/opera-proxy/opera-proxy $OPTIONS
TimeoutStopSec=5s
LimitNOFILE=1048576
LimitNPROC=512
PrivateTmp=true
ProtectSystem=full
[Install]
WantedBy=default.target
proxy2opera-proxy.service
:
[Unit]
Requires=opera-proxy.service
After=opera-proxy.service
Requires=proxy2opera-proxy.socket
After=proxy2opera-proxy.socket
BindsTo=opera-proxy.service
[Service]
Type=notify
ExecStart=/usr/lib/systemd/systemd-socket-proxyd 127.0.0.1:18081 --exit-idle-time=600
proxy2opera-proxy.socket
:
[Socket]
ListenStream=18080
[Install]
WantedBy=sockets.target
opera-proxy.conf
:
OPTIONS=-bind-address 127.0.0.1:18081