diff --git a/scripts/install.sh b/scripts/install.sh index 4613532d88a..7234de64cf4 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -186,7 +186,7 @@ main() { PKG_EXT=$(package_extension) PKG_NAME=AdGuardHome_${OS}_${CPU}.${PKG_EXT} - SCRIPT_URL="https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/install.sh/scripts/install.sh" + SCRIPT_URL="https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh" URL="https://static.adguard.com/adguardhome/${CHANNEL}/${PKG_NAME}" OUT_DIR=/opt @@ -198,8 +198,7 @@ main() { log_info "Please note, that AdGuard Home requires root privileges to install using this script." log_info "Restarting with root privileges" - # exec curl -sSL ${SCRIPT_URL} | sudo sh "$@" - cat install.sh | sudo sh -s "$@" + exec curl -sSL ${SCRIPT_URL} | sudo sh -s "$@" exit $? else log_info "Root privileges are required to install AdGuard Home using this installer." @@ -216,8 +215,8 @@ main() { unpack "${PKG_NAME}" "${OUT_DIR}" "${PKG_EXT}" || error_exit "Cannot unpack the package" - # TODO: echo - # ${OUT_DIR}/AdGuardHome/AdGuardHome -s install || error_exit "ERROR: Cannot install AdGuardHome as a service" + # Install AdGuard Home service and run it + ${OUT_DIR}/AdGuardHome/AdGuardHome -s install || error_exit "Cannot install AdGuardHome as a service" rm "${PKG_NAME}"