diff --git a/ct/alpine-powerdns.sh b/ct/alpine-powerdns.sh new file mode 100644 index 000000000..470079396 --- /dev/null +++ b/ct/alpine-powerdns.sh @@ -0,0 +1,50 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func) +# Copyright (c) 2021-2026 community-scripts ORG +# Author: MickLesk (CanbiZ) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://github.com/orhun/rustypaste + +APP="Alpine-PowerDNS" +var_tags="${var_tags:-os;alpine;dns}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-4}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.23}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + check_container_storage + check_container_resources + + if ! apk info -e pdns >/dev/null 2>&1; then + msg_error "No ${APP} Installation Found!" + exit + fi + + msg_info "Updating PowerDNS" + $STD apk -U upgrade + msg_ok "Updated PowerDNS" + + msg_info "Restarting Services" + $STD rc-service pdns restart + msg_ok "Restarted Services" + msg_ok "Updated successfully!" + exit +} + +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}:53${CL}" diff --git a/install/alpine-powerdns.sh b/install/alpine-powerdns.sh new file mode 100644 index 000000000..de78cf8a5 --- /dev/null +++ b/install/alpine-powerdns.sh @@ -0,0 +1,34 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2026 community-scripts ORG +# Author: Slaviša Arežina (tremor021) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://www.powerdns.com/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing PowerDNS" +$STD apk add --no-cache pdns pdns-backend-sqlite3 pdns-doc +msg_ok "Installed PowerDNS" + +msg_info "Configuring PowerDNS" +sed -i '/^# launch=$/c\launch=gsqlite3\ngsqlite3-database=/var/lib/powerdns/pdns.sqlite3' /etc/pdns/pdns.conf +mkdir /var/lib/powerdns +sqlite3 /var/lib/powerdns/pdns.sqlite3 < /usr/share/doc/pdns/schema.sqlite3.sql +chown -R pdns:pdns /var/lib/powerdns +msg_ok "Configured PowerDNS" + +msg_info "Creating Service" +$STD rc-update add pdns default +$STD rc-service pdns start +msg_ok "Created Service" + +motd_ssh +customize +cleanup_lxc