mirror of
https://github.com/CerberusV1/minecraft_deploy.git
synced 2026-01-13 03:23:42 +01:00
new dirs
This commit is contained in:
32
deploy.sh
32
deploy.sh
@@ -17,14 +17,17 @@ cat <<EOF
|
|||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
# Checking Dependencies
|
# Checking Dependencies
|
||||||
# --------------------------------------------------------
|
# --------------------------------------------------------
|
||||||
|
|
||||||
echo "Checking dependencies..."
|
echo "Checking dependencies..."
|
||||||
|
sleep 5
|
||||||
# Function to check if a program is installed
|
# Function to check if a program is installed
|
||||||
check_installed() {
|
check_installed() {
|
||||||
if ! which "$1" > /dev/null 2>&1; then
|
if ! which "$1" > /dev/null 2>&1; then
|
||||||
echo "$1 is not installed."
|
echo "$1 will be installed..."
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
echo "$1 is already installed."
|
echo "$1 is already installed."
|
||||||
@@ -43,10 +46,10 @@ tmux_installed=$?
|
|||||||
# Function to check if /etc/rc.local already contains the required lines
|
# Function to check if /etc/rc.local already contains the required lines
|
||||||
check_rc_local() {
|
check_rc_local() {
|
||||||
if grep -q "exec 1>/tmp/rc.local.log 2>&1" /etc/rc.local && grep -q "set -x" /etc/rc.local; then
|
if grep -q "exec 1>/tmp/rc.local.log 2>&1" /etc/rc.local && grep -q "set -x" /etc/rc.local; then
|
||||||
echo "The changes in rc.local are already present."
|
echo "rc.local is already configured"
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
echo "The changes in rc.local are missing."
|
echo "rc.local not configured"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -82,5 +85,26 @@ EOL
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "All required programs are already installed and rc.local is configured. Proceeding..."
|
echo "All required programs are already installed and rc.local is configured. Proceeding with installation..."
|
||||||
fi
|
fi
|
||||||
|
sleep 2
|
||||||
|
|
||||||
|
|
||||||
|
# --------------------------------------------------------
|
||||||
|
# Installation Directories
|
||||||
|
# --------------------------------------------------------
|
||||||
|
echo "Give your server a name. Under the ~/servername you can later"
|
||||||
|
echo "find all server files and the management script."
|
||||||
|
echo "Use "-" or "_" as name seperator!"
|
||||||
|
read -p "Servername: " name
|
||||||
|
|
||||||
|
working_dir="$HOME/$name"
|
||||||
|
management_dir="$HOME/$name/management"
|
||||||
|
management_logs="$HOME/$name/management/logs"
|
||||||
|
server_dir="$HOME/$name/server"
|
||||||
|
|
||||||
|
echo "Creating directories"
|
||||||
|
mkdir $working_dir
|
||||||
|
mkdir $management_dir
|
||||||
|
mkdir $management_logs
|
||||||
|
mkdir $server_dir
|
||||||
Reference in New Issue
Block a user