AdGuard Linux 版無法在系統啟動時自動執行,如何開啟開機自動啟動?
在使用 systemd 的發行版上,需要手動啟用服務。請建立服務檔案
/etc/systemd/system/adguard-cli.service 並加入以下設定:[Unit]
Description=AdGuard CLI
After=network.target
[Service]
Type=forking
WorkingDirectory=/opt/adguard-cli
ExecStart=/opt/adguard-cli/adguard-cli start
ExecStop=/opt/adguard-cli/adguard-cli stop
Restart=always
TimeoutStartSec=0
TimeoutStopSec=0
StandardOutput=journal
RemainAfterExit=yes
User=username
[Install]
WantedBy=multi-user.target
In the User=username parameter, replace username with your Linux username.
- Run the following commands to enable the service:
systemctl daemon-reload systemctl enable --now adguard-cli
很高興能夠幫助您!
如果您有任何問題或建議,請通過電子信箱聯繫我們 support@adguard.com


