mirror of
https://github.com/tteck/Proxmox.git
synced 2024-11-17 11:56:20 +00:00
Update adguard-install.sh
eliminate outside bash script
This commit is contained in:
parent
4544974c73
commit
04638c27ad
@ -20,9 +20,33 @@ $STD apt-get install -y mc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Installing AdGuard Home"
|
||||
$STD bash <(curl -fsSL https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh)
|
||||
tar zxvf <(curl -fsSL https://static.adtidy.org/adguardhome/release/AdGuardHome_linux_amd64.tar.gz) -C /opt &>/dev/null
|
||||
msg_ok "Installed AdGuard Home"
|
||||
|
||||
msg_info "Creating Service"
|
||||
cat <<EOF >/etc/systemd/system/AdGuardHome.service
|
||||
[Unit]
|
||||
Description=AdGuard Home: Network-level blocker
|
||||
ConditionFileIsExecutable=/opt/AdGuardHome/AdGuardHome
|
||||
After=syslog.target network-online.target
|
||||
|
||||
[Service]
|
||||
StartLimitInterval=5
|
||||
StartLimitBurst=10
|
||||
ExecStart=/opt/AdGuardHome/AdGuardHome "-s" "run"
|
||||
WorkingDirectory=/opt/AdGuardHome
|
||||
StandardOutput=file:/var/log/AdGuardHome.out
|
||||
StandardError=file:/var/log/AdGuardHome.err
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
EnvironmentFile=-/etc/sysconfig/AdGuardHome
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now AdGuardHome.service
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user