summaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
authorRoger Gonzalez <roger@rogs.me>2023-01-06 17:40:53 -0300
committerRoger Gonzalez <roger@rogs.me>2023-01-06 17:40:53 -0300
commitda1e37b9ce9697d19e347ef05e38076efadacb24 (patch)
tree6b05f7776ea812940315bf32646792d3f1edbe78 /install.sh
parenteefb539a46a9164f454ec0b16c8ee6af8160f8d3 (diff)
Added comments
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/install.sh b/install.sh
index 5492c63..bf4d160 100755
--- a/install.sh
+++ b/install.sh
@@ -19,6 +19,9 @@ echo "We just need you to answer some questions"
echo "===================================================="
echo ""
+# ============================================================================================
+# Check all the prerequisites are installed before continuing
+# ============================================================================================
echo "Checking prerequisites..."
if command -v docker &> /dev/null; then
@@ -34,7 +37,11 @@ else
echo "⚠ You need to have docker-compose installed and in your PATH! EXITING ⚠"
exit 255
fi
+# ============================================================================================
+# ============================================================================================
+# Gathering information
+# ============================================================================================
read -p "Where do you want to instal the docker-compose file? [/opt/yams] : " install_location
read -p "What's the user that is going to run the media server? [$USER] : " username
@@ -48,7 +55,11 @@ puid=$(id -u $username)
pgid=$(id -g $username)
echo "Configuring the docker for the user $username on \"$install_location\"..."
+# ============================================================================================
+# ============================================================================================
+# Actually installing everything!
+# ============================================================================================
# Checking if the install_location exists
[[ -f $install_location ]] || mkdir -p $install_location || (echo "You need to have permissions on the folder! EXITING" && exit 255)
@@ -65,3 +76,4 @@ sed -i -e "s/<your_PGID>/$pgid/g" $filename
# Set entertainment_folder
sed -i -e "s;<entertainment_folder>;$ENTERTAINMENT_FOLDER;g" $filename
+# ============================================================================================