mirror of
https://github.com/community-scripts/ProxmoxVE
synced 2025-04-20 00:25:12 +00:00
Alpine-AdGuardHome (#3875)
* Alpine-AdGuardHome * modify tag * Update alpine-adguard.sh
This commit is contained in:
parent
203d022db5
commit
54b794da54
47
ct/alpine-adguard.sh
Normal file
47
ct/alpine-adguard.sh
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: MickLesk (CanbiZ)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://adguardhome.com/
|
||||||
|
|
||||||
|
APP="Alpine-AdGuard"
|
||||||
|
var_tags="${var_tags:-alpine;adblock}"
|
||||||
|
var_cpu="${var_cpu:-1}"
|
||||||
|
var_ram="${var_ram:-256}"
|
||||||
|
var_disk="${var_disk:-1}"
|
||||||
|
var_os="${var_os:-alpine}"
|
||||||
|
var_version="${var_version:-3.21}"
|
||||||
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
|
header_info "$APP"
|
||||||
|
variables
|
||||||
|
color
|
||||||
|
catch_errors
|
||||||
|
|
||||||
|
function update_script() {
|
||||||
|
header_info
|
||||||
|
msg_info "Updating Alpine Packages"
|
||||||
|
$STD apk update
|
||||||
|
$STD apk upgrade
|
||||||
|
msg_ok "Updated Alpine Packages"
|
||||||
|
|
||||||
|
msg_info "Updating AdGuard Home"
|
||||||
|
$STD /opt/AdGuardHome/AdGuardHome --update
|
||||||
|
msg_ok "Updated AdGuard Home"
|
||||||
|
|
||||||
|
msg_info "Restarting AdGuard Home"
|
||||||
|
$STD rc-service adguardhome restart
|
||||||
|
msg_ok "Restarted AdGuard Home"
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
start
|
||||||
|
build_container
|
||||||
|
description
|
||||||
|
|
||||||
|
msg_ok "Completed Successfully!\n"
|
||||||
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
|
@ -24,6 +24,17 @@
|
|||||||
"os": "debian",
|
"os": "debian",
|
||||||
"version": "12"
|
"version": "12"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "alpine",
|
||||||
|
"script": "ct/alpine-adguard.sh",
|
||||||
|
"resources": {
|
||||||
|
"cpu": 1,
|
||||||
|
"ram": 256,
|
||||||
|
"hdd": 1,
|
||||||
|
"os": "alpine",
|
||||||
|
"version": "3.21"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"default_credentials": {
|
"default_credentials": {
|
||||||
|
47
install/alpine-adguard-install.sh
Normal file
47
install/alpine-adguard-install.sh
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
|
# Author: MickLesk (CanbiZ)
|
||||||
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
|
# Source: https://adguardhome.com/
|
||||||
|
|
||||||
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
|
color
|
||||||
|
verb_ip6
|
||||||
|
catch_errors
|
||||||
|
setting_up_container
|
||||||
|
network_check
|
||||||
|
update_os
|
||||||
|
|
||||||
|
msg_info "Downloading AdGuard Home"
|
||||||
|
$STD curl -fsSL -o /tmp/AdGuardHome_linux_amd64.tar.gz \
|
||||||
|
"https://github.com/AdguardTeam/AdGuardHome/releases/latest/download/AdGuardHome_linux_amd64.tar.gz"
|
||||||
|
msg_ok "Downloaded AdGuard Home"
|
||||||
|
|
||||||
|
msg_info "Installing AdGuard Home"
|
||||||
|
$STD tar -xzf /tmp/AdGuardHome_linux_amd64.tar.gz -C /opt
|
||||||
|
$STD rm /tmp/AdGuardHome_linux_amd64.tar.gz
|
||||||
|
msg_ok "Installed AdGuard Home"
|
||||||
|
|
||||||
|
msg_info "Creating AdGuard Home Service"
|
||||||
|
cat <<EOF >/etc/init.d/adguardhome
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
name="AdGuardHome"
|
||||||
|
description="AdGuard Home Service"
|
||||||
|
command="/opt/AdGuardHome/AdGuardHome"
|
||||||
|
command_background="yes"
|
||||||
|
pidfile="/run/adguardhome.pid"
|
||||||
|
EOF
|
||||||
|
$STD chmod +x /etc/init.d/adguardhome
|
||||||
|
msg_ok "Created AdGuard Home Service"
|
||||||
|
|
||||||
|
msg_info "Enabling AdGuard Home Service"
|
||||||
|
$STD rc-update add adguardhome default
|
||||||
|
msg_ok "Enabled AdGuard Home Service"
|
||||||
|
|
||||||
|
msg_info "Starting AdGuard Home"
|
||||||
|
$STD rc-service adguardhome start
|
||||||
|
msg_ok "Started AdGuard Home"
|
||||||
|
|
||||||
|
motd_ssh
|
||||||
|
customize
|
Loading…
x
Reference in New Issue
Block a user