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