Renamed "folder" to "directory"
This commit is contained in:
parent
0be3a06df0
commit
078fa2a18b
@ -1,7 +1,7 @@
|
||||
# Base configuration
|
||||
PUID=<your_PUID>
|
||||
PGID=<your_PGID>
|
||||
MEDIA_FOLDER=<media_folder>
|
||||
MEDIA_DIRECTORY=<media_directory>
|
||||
INSTALL_LOCATION=<install_location>
|
||||
MEDIA_SERVICE=<media_service>
|
||||
|
||||
|
@ -11,8 +11,8 @@ services:
|
||||
- PGID=${PGID}
|
||||
- VERSION=docker
|
||||
volumes:
|
||||
- ${MEDIA_FOLDER}/movies:/data/movies
|
||||
- ${MEDIA_FOLDER}/tvshows:/data/tvshows
|
||||
- ${MEDIA_DIRECTORY}/movies:/data/movies
|
||||
- ${MEDIA_DIRECTORY}/tvshows:/data/tvshows
|
||||
- ${INSTALL_LOCATION}/config/${MEDIA_SERVICE}:/config
|
||||
ports:
|
||||
- 8096:8096
|
||||
@ -27,7 +27,7 @@ services:
|
||||
- PGID=${PGID}
|
||||
- WEB_UI_PORT=8080
|
||||
volumes:
|
||||
- ${MEDIA_FOLDER}/downloads:/downloads
|
||||
- ${MEDIA_DIRECTORY}/downloads:/downloads
|
||||
- ${INSTALL_LOCATION}/config/qbittorrent:/config
|
||||
restart: unless-stopped
|
||||
ports: # qbittorrent
|
||||
@ -43,8 +43,8 @@ services:
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
volumes:
|
||||
- ${MEDIA_FOLDER}/tvshows:/tv
|
||||
- ${MEDIA_FOLDER}/downloads:/downloads
|
||||
- ${MEDIA_DIRECTORY}/tvshows:/tv
|
||||
- ${MEDIA_DIRECTORY}/downloads:/downloads
|
||||
- ${INSTALL_LOCATION}/config/sonarr:/config
|
||||
ports:
|
||||
- 8989:8989
|
||||
@ -59,8 +59,8 @@ services:
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
volumes:
|
||||
- ${MEDIA_FOLDER}/movies:/movies
|
||||
- ${MEDIA_FOLDER}/downloads:/downloads
|
||||
- ${MEDIA_DIRECTORY}/movies:/movies
|
||||
- ${MEDIA_DIRECTORY}/downloads:/downloads
|
||||
- ${INSTALL_LOCATION}/config/radarr:/config
|
||||
ports:
|
||||
- 7878:7878
|
||||
@ -75,8 +75,8 @@ services:
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
volumes:
|
||||
- ${MEDIA_FOLDER}/music:/music
|
||||
- ${MEDIA_FOLDER}/downloads:/downloads
|
||||
- ${MEDIA_DIRECTORY}/music:/music
|
||||
- ${MEDIA_DIRECTORY}/downloads:/downloads
|
||||
- ${INSTALL_LOCATION}/config/lidarr:/config
|
||||
ports:
|
||||
- 8686:8686
|
||||
@ -91,8 +91,8 @@ services:
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
volumes:
|
||||
- ${MEDIA_FOLDER}/books:/books
|
||||
- ${MEDIA_FOLDER}/downloads:/downloads
|
||||
- ${MEDIA_DIRECTORY}/books:/books
|
||||
- ${MEDIA_DIRECTORY}/downloads:/downloads
|
||||
- ${INSTALL_LOCATION}/config/readarr:/config
|
||||
ports:
|
||||
- 8787:8787
|
||||
@ -107,8 +107,8 @@ services:
|
||||
- PUID=${PUID}
|
||||
- PGID=${PGID}
|
||||
volumes:
|
||||
- ${MEDIA_FOLDER}/movies:/movies
|
||||
- ${MEDIA_FOLDER}/tvshows:/tv
|
||||
- ${MEDIA_DIRECTORY}/movies:/movies
|
||||
- ${MEDIA_DIRECTORY}/tvshows:/tv
|
||||
- ${INSTALL_LOCATION}/config/bazarr:/config
|
||||
ports:
|
||||
- 6767:6767
|
||||
|
27
docs.org
27
docs.org
@ -216,20 +216,23 @@ fi
|
||||
:END:
|
||||
|
||||
#+begin_src bash
|
||||
read -p "Please, input your media folder [/srv/media]: " media_folder
|
||||
media_folder=${media_folder:-"/srv/media"}
|
||||
read -p "Please, input your media directory [/srv/media]: " media_folder
|
||||
media_directory=${media_directory:-"/srv/media"}
|
||||
|
||||
if [ ! -d "$media_folder" ]; then
|
||||
if ! mkdir -p "$media_folder"; then
|
||||
send_error_message "There was an error creating the installation directory at \"$media_folder\". Make sure you have the necessary permissions ❌"
|
||||
read -p "Are you sure your media directory is \"$media_directory\"? [y/N]: " media_directory_correct
|
||||
media_directory_correct=${media_directory_correct:-"n"}
|
||||
|
||||
if [ ! -d "$media_directory" ]; then
|
||||
echo "The directory \"$media_directory\" does not exists. Attempting to create..."
|
||||
if ! mkdir -p "$media_directory"; then
|
||||
send_error_message "There was an error creating the installation directory at \"$media_directory\". Make sure you have the necessary permissions ❌"
|
||||
else
|
||||
send_success_message "Directory $media_directory created ✅"
|
||||
fi
|
||||
fi
|
||||
|
||||
read -p "Are you sure your media folder is \"$media_folder\"? [y/N]: " media_folder_correct
|
||||
media_folder_correct=${media_folder_correct:-"n"}
|
||||
|
||||
if [ "$media_folder_correct" == "n" ]; then
|
||||
send_error_message "Media folder is not correct. Please fix it and run the script again ❌"
|
||||
if [ "$media_directory_correct" == "n" ]; then
|
||||
send_error_message "Media directory is not correct. Please fix it and run the script again ❌"
|
||||
fi
|
||||
#+end_src
|
||||
|
||||
@ -354,7 +357,7 @@ required information]]" step.
|
||||
#+begin_src bash
|
||||
sed -i -e "s|<your_PUID>|$puid|g" "$env_file" \
|
||||
-e "s|<your_PGID>|$pgid|g" "$env_file" \
|
||||
-e "s|<media_folder>|$media_folder|g" "$env_file" \
|
||||
-e "s|<media_directory>|$media_directory|g" "$env_file" \
|
||||
-e "s|<media_service>|$media_service|g" "$env_file" \
|
||||
-e "s|<media_service>|$media_service|g" "$filename"
|
||||
|
||||
@ -432,7 +435,7 @@ fi
|
||||
This adds the correct permissions to the media folder, in case they are not correct.
|
||||
|
||||
#+begin_src bash
|
||||
if sudo chown -R "$puid":"$pgid" "$media_folder"; then
|
||||
if sudo chown -R "$puid":"$pgid" "$media_directory"; then
|
||||
send_success_message "Media folder ownership and permissions set successfully ✅"
|
||||
else
|
||||
send_error_message "Failed to set ownership and permissions for the media folder. Check permissions ❌"
|
||||
|
27
install.sh
27
install.sh
@ -96,20 +96,23 @@ else
|
||||
send_error_message "The user \"$username\" doesn't exist!"
|
||||
fi
|
||||
|
||||
read -p "Please, input your media folder [/srv/media]: " media_folder
|
||||
media_folder=${media_folder:-"/srv/media"}
|
||||
read -p "Please, input your media directory [/srv/media]: " media_folder
|
||||
media_directory=${media_directory:-"/srv/media"}
|
||||
|
||||
if [ ! -d "$media_folder" ]; then
|
||||
if ! mkdir -p "$media_folder"; then
|
||||
send_error_message "There was an error creating the installation directory at \"$media_folder\". Make sure you have the necessary permissions ❌"
|
||||
read -p "Are you sure your media directory is \"$media_directory\"? [y/N]: " media_directory_correct
|
||||
media_directory_correct=${media_directory_correct:-"n"}
|
||||
|
||||
if [ ! -d "$media_directory" ]; then
|
||||
echo "The directory \"$media_directory\" does not exists. Attempting to create..."
|
||||
if ! mkdir -p "$media_directory"; then
|
||||
send_error_message "There was an error creating the installation directory at \"$media_directory\". Make sure you have the necessary permissions ❌"
|
||||
else
|
||||
send_success_message "Directory $media_directory created ✅"
|
||||
fi
|
||||
fi
|
||||
|
||||
read -p "Are you sure your media folder is \"$media_folder\"? [y/N]: " media_folder_correct
|
||||
media_folder_correct=${media_folder_correct:-"n"}
|
||||
|
||||
if [ "$media_folder_correct" == "n" ]; then
|
||||
send_error_message "Media folder is not correct. Please fix it and run the script again ❌"
|
||||
if [ "$media_directory_correct" == "n" ]; then
|
||||
send_error_message "Media directory is not correct. Please fix it and run the script again ❌"
|
||||
fi
|
||||
|
||||
echo -e "\n\n\nTime to choose your media service."
|
||||
@ -197,7 +200,7 @@ done
|
||||
|
||||
sed -i -e "s|<your_PUID>|$puid|g" "$env_file" \
|
||||
-e "s|<your_PGID>|$pgid|g" "$env_file" \
|
||||
-e "s|<media_folder>|$media_folder|g" "$env_file" \
|
||||
-e "s|<media_directory>|$media_directory|g" "$env_file" \
|
||||
-e "s|<media_service>|$media_service|g" "$env_file" \
|
||||
-e "s|<media_service>|$media_service|g" "$filename"
|
||||
|
||||
@ -237,7 +240,7 @@ else
|
||||
send_error_message "Failed to install YAMS CLI. Make sure you have the necessary permissions ❌"
|
||||
fi
|
||||
|
||||
if sudo chown -R "$puid":"$pgid" "$media_folder"; then
|
||||
if sudo chown -R "$puid":"$pgid" "$media_directory"; then
|
||||
send_success_message "Media folder ownership and permissions set successfully ✅"
|
||||
else
|
||||
send_error_message "Failed to set ownership and permissions for the media folder. Check permissions ❌"
|
||||
|
Loading…
x
Reference in New Issue
Block a user