|
|
|
@ -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
|
|
|
|
|
|
|
|
|
|