From 644be6549562a4af8d8da72c10d2279a11e451ee Mon Sep 17 00:00:00 2001 From: Bernward Sanchez Date: Thu, 15 Dec 2022 12:53:53 +0800 Subject: [PATCH 1/2] Create setup_linux.sh --- deploy/auto-setup/setup_linux.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 deploy/auto-setup/setup_linux.sh diff --git a/deploy/auto-setup/setup_linux.sh b/deploy/auto-setup/setup_linux.sh new file mode 100644 index 0000000..19cda58 --- /dev/null +++ b/deploy/auto-setup/setup_linux.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Create a new group for PowerDNS-Admin +groupadd powerdnsadmin + +# Create a user for PowerDNS-Admin +useradd --system -g powerdnsadmin powerdnsadmin + +# Make the new user and group the owners of the PowerDNS-Admin files +chown -R powerdnsadmin:powerdnsadmin /opt/web/powerdns-admin + +# Start the PowerDNS-Admin service +systemctl start powerdns-admin + +# Enable the PowerDNS-Admin service to start automatically at boot +systemctl enable powerdns-admin From 3aa6d1f25892e8ea01db82f6e2537c76d1833805 Mon Sep 17 00:00:00 2001 From: Bernward Sanchez Date: Thu, 15 Dec 2022 12:54:31 +0800 Subject: [PATCH 2/2] Create setup_win.bat --- deploy/auto-setup/setup_win.bat | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 deploy/auto-setup/setup_win.bat diff --git a/deploy/auto-setup/setup_win.bat b/deploy/auto-setup/setup_win.bat new file mode 100644 index 0000000..a5ee9fd --- /dev/null +++ b/deploy/auto-setup/setup_win.bat @@ -0,0 +1,16 @@ +@echo off + +rem Create a new group for PowerDNS-Admin +net localgroup powerdnsadmin /add + +rem Create a user for PowerDNS-Admin +net user powerdnsadmin /add /passwordchg:no /homedir:nul /active:yes /expires:never /passwordreq:no /s + +rem Make the new user and group the owners of the PowerDNS-Admin files +icacls "C:\path\to\powerdns-admin" /setowner "powerdnsadmin" + +rem Start the PowerDNS-Admin service +net start powerdns-admin + +rem Enable the PowerDNS-Admin service to start automatically at boot +sc config powerdns-admin start= auto