Skip to content

Commit

Permalink
* (home): fix install script
Browse files Browse the repository at this point in the history
  • Loading branch information
ameshkov committed Oct 7, 2020
1 parent 073b5fb commit 22205d8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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."
Expand All @@ -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}"

Expand Down

0 comments on commit 22205d8

Please sign in to comment.