summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorFivePixels <o5pxels@gmail.com>2021-09-07 15:55:03 -0500
committerFivePixels <o5pxels@gmail.com>2021-09-07 15:55:03 -0500
commit1313218217ebded64921cacda87b6234a9d7c463 (patch)
treed8adf4bdc47233856b2e7272d2f93d29a858540c /scripts
parent1e2e705f8dd864cbe34ed4419dcc371234fae26c (diff)
downloadBedrockConnect-1313218217ebded64921cacda87b6234a9d7c463.tar.gz
BedrockConnect-1313218217ebded64921cacda87b6234a9d7c463.tar.bz2
BedrockConnect-1313218217ebded64921cacda87b6234a9d7c463.zip
Add arch to install script, extra variables between package managers
Diffstat (limited to 'scripts')
-rw-r--r--scripts/install-bind.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/scripts/install-bind.sh b/scripts/install-bind.sh
index 85f9771..2f4a3f5 100644
--- a/scripts/install-bind.sh
+++ b/scripts/install-bind.sh
@@ -68,6 +68,7 @@ if [[ -f /etc/os-release ]]; then
source /etc/os-release
if [[ "$ID" == "ubuntu" || "$ID_LIKE" == "ubuntu" ]]; then
PKG_MGR=apt
+ PKG_MGR_SYNTAX="install"
PKGS="bind9 dnsutils"
NAMED_OPTIONS="/etc/bind/named.conf.options"
NAMED_ZONES="/etc/bind/named.conf.local"
@@ -75,11 +76,20 @@ if [[ -f /etc/os-release ]]; then
SERVICE_NAME="bind9"
elif [[ "$ID" == "centos" ]]; then
PKG_MGR=yum
+ PKG_MGR_SYNTAX="install"
PKGS="bind bind-utils"
NAMED_OPTIONS="/etc/named.conf"
NAMED_ZONES="/etc/named.conf"
NAMED_DBS="/var/named"
SERVICE_NAME="named"
+ elif [[ "$ID" == "arch" ]]; then
+ PKG_MGR=pacman
+ PKG_MGR_SYNTAX="-S"
+ PKGS="bind"
+ NAMED_OPTIONS="/etc/named.conf"
+ NAMED_ZONES="/etc/named.conf"
+ NAMED_DBS="/var/named"
+ SERVICE_NAME="named"
else
echo "Unsupported OS"
exit 2
@@ -91,7 +101,7 @@ fi
# Install
-$PKG_MGR install -y $PKGS
+$PKG_MGR $PKG_MGR_SYNTAX -y $PKGS
# Configure
@@ -105,7 +115,9 @@ add_domain inpvp.net play
add_domain lbsg.net mco
add_domain cubecraft.net mco
add_domain galaxite.net play
+add_domain 4b4t.xyz play
# Reload config
systemctl reload $SERVICE_NAME
+echo "Done!"