Skip to content

Commit 54b794d

Browse files
authored
Alpine-AdGuardHome (#3875)
* Alpine-AdGuardHome * modify tag * Update alpine-adguard.sh
1 parent 203d022 commit 54b794d

File tree

3 files changed

+105
-0
lines changed

3 files changed

+105
-0
lines changed

ct/alpine-adguard.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://adguardhome.com/
7+
8+
APP="Alpine-AdGuard"
9+
var_tags="${var_tags:-alpine;adblock}"
10+
var_cpu="${var_cpu:-1}"
11+
var_ram="${var_ram:-256}"
12+
var_disk="${var_disk:-1}"
13+
var_os="${var_os:-alpine}"
14+
var_version="${var_version:-3.21}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
msg_info "Updating Alpine Packages"
25+
$STD apk update
26+
$STD apk upgrade
27+
msg_ok "Updated Alpine Packages"
28+
29+
msg_info "Updating AdGuard Home"
30+
$STD /opt/AdGuardHome/AdGuardHome --update
31+
msg_ok "Updated AdGuard Home"
32+
33+
msg_info "Restarting AdGuard Home"
34+
$STD rc-service adguardhome restart
35+
msg_ok "Restarted AdGuard Home"
36+
37+
exit 0
38+
}
39+
40+
start
41+
build_container
42+
description
43+
44+
msg_ok "Completed Successfully!\n"
45+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
46+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
47+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"

frontend/public/json/adguard.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,17 @@
2424
"os": "debian",
2525
"version": "12"
2626
}
27+
},
28+
{
29+
"type": "alpine",
30+
"script": "ct/alpine-adguard.sh",
31+
"resources": {
32+
"cpu": 1,
33+
"ram": 256,
34+
"hdd": 1,
35+
"os": "alpine",
36+
"version": "3.21"
37+
}
2738
}
2839
],
2940
"default_credentials": {

install/alpine-adguard-install.sh

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2025 community-scripts ORG
4+
# Author: MickLesk (CanbiZ)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
6+
# Source: https://adguardhome.com/
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
msg_info "Downloading AdGuard Home"
17+
$STD curl -fsSL -o /tmp/AdGuardHome_linux_amd64.tar.gz \
18+
"https://github.com/AdguardTeam/AdGuardHome/releases/latest/download/AdGuardHome_linux_amd64.tar.gz"
19+
msg_ok "Downloaded AdGuard Home"
20+
21+
msg_info "Installing AdGuard Home"
22+
$STD tar -xzf /tmp/AdGuardHome_linux_amd64.tar.gz -C /opt
23+
$STD rm /tmp/AdGuardHome_linux_amd64.tar.gz
24+
msg_ok "Installed AdGuard Home"
25+
26+
msg_info "Creating AdGuard Home Service"
27+
cat <<EOF >/etc/init.d/adguardhome
28+
#!/sbin/openrc-run
29+
name="AdGuardHome"
30+
description="AdGuard Home Service"
31+
command="/opt/AdGuardHome/AdGuardHome"
32+
command_background="yes"
33+
pidfile="/run/adguardhome.pid"
34+
EOF
35+
$STD chmod +x /etc/init.d/adguardhome
36+
msg_ok "Created AdGuard Home Service"
37+
38+
msg_info "Enabling AdGuard Home Service"
39+
$STD rc-update add adguardhome default
40+
msg_ok "Enabled AdGuard Home Service"
41+
42+
msg_info "Starting AdGuard Home"
43+
$STD rc-service adguardhome start
44+
msg_ok "Started AdGuard Home"
45+
46+
motd_ssh
47+
customize

0 commit comments

Comments
 (0)