Skip to content

Commit

Permalink
address nitpicks
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavlogal committed Jul 2, 2024
1 parent e1777eb commit 20317a9
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# If you're not sure what timezone you should fill in, you can look at the following list:
# https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# Use the column that says "TZ database name".
# to find your system's preconfigured timezone run: cat /etc/timezone
# To find your system's preconfigured timezone run: cat /etc/timezone
TIMEZONE=Europe/Amsterdam

# The PleX claim token is used to connect your server to your account. It can be obtained at
Expand Down Expand Up @@ -31,4 +31,4 @@ SABNZBD_UID=13011
JELLYSEERR_UID=13012

# The user used to run docker-compose. To find this run: id -u
UID=1000
UID=1000
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ It's set up to follow the [TRaSH guidelines](https://trash-guides.info/Hardlinks
- [Jellyseerr](https://github.com/Fallenbagel/jellyseerr) is like Overseerr, but for Jellyfin.

## Requirements
Currently this script only works on Linux. The only requirements other than that are **Python 3** and **docker** with **docker-compose-v2**.
Currently this script only works on Linux. There is a chance that the sample docker compose file will work on Windows, although untested.
The only requirements other than that are **Python 3** and **docker** with **docker-compose-v2**.
While this script _may_ work on docker-compose-v1 it's made to be and highly recommended to be run using v2.
The easiest way to install these dependencies on Ubuntu is by running:
The easiest way to install these dependencies on Ubuntu and other Debian-based distors is by running:
```
sudo apt-get install python3 docker.io docker-compose-v2
```
Expand Down Expand Up @@ -85,6 +86,8 @@ That's it! Your containers are now up and you can continue to set up the setting
take a look at [important notes](#important-notes) before you continue.
## Important notes
- You probably shouldn't run the python script as root. Ideally you should create a brand new user that's just for these services, but any regular user will do.
It will need your password for `sudo` to set up the permissions and folder structures, but you shouldn't run it *as* root.
- If you already used this script previously and want to clean up old users, run `remove_old_users.sh`.
This is also recommended if you are updating from an earlier version of this script, since there were previously some conflicts in user IDs.
- It is recommended to restart your system after script completion, so that newly created users and groups can be loaded properly.
Expand Down
8 changes: 4 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def take_input(service_name, service_type):
if choice:
services_classed[service_type].append(service_name)
else:
print('Invalid input, please enter Y or N. Not adding ' + service_name + ".")
print('Not adding ' + service_name + ".")

def take_directory_input():
while True:
Expand Down Expand Up @@ -111,7 +111,7 @@ def take_directory_input():

print('\n===CONFIGURATION===')

print('Please enter your timezone (like "Europe/Amsterdam") or press enter to use your PCs configured timezone:', end=' ')
print('Please enter your timezone (like "Europe/Amsterdam") or press enter to use your system\'s configured timezone:', end=' ')
timezone = input()
if (timezone == ''):
timezone = open("/etc/timezone", "r").readline()
Expand Down Expand Up @@ -140,7 +140,7 @@ def take_directory_input():
compose.close()
print("Docker compose file generated successfully.")

print("Do you want to also generate the required folder structure and permissions? (this is required for first time setup) [Y/N]: ")
print("Do you want to also generate the required folder structure and permissions? (this is required for first time setup) [Y/n]: ")
generate_permissions = take_boolean_input()
if generate_permissions:
permission_setup = UserGroupSetup(root_dir=root_dir)
Expand All @@ -150,7 +150,7 @@ def take_directory_input():
except AttributeError:
pass
else:
print("Aborted.")
print("Permission and folder structure generation skipped by user.")


print('Process complete. You can now run "docker compose up -d" to start your containers.')
Expand Down
4 changes: 2 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ sudo groupadd mediacenter -g $MEDIACENTER_GID
# Adds current user to the mediacenter group. This is recommended so that you can still have access to files inside the ezarr folder structure for manual control.
# This is way better than just doing everything as root, especially on NFS shares. Also some services run as the default user anyway (Jellyfin, Tautulli).
sudo usermod -a -G mediacenter $USER
# When you add the user to the group the cahanges don't take effect immediately.
# When you add the user to the group the changes don't take effect immediately.
# You can force them by running "sudo newgrp mediacenter" but that won't always work and it's better to just reboot after the script finishes running.

# adds all the service users to the group
Expand Down Expand Up @@ -75,4 +75,4 @@ sudo chown -R jellyseerr:mediacenter config/jellyseerr-config
sudo chown -R bazarr:mediacenter config/bazarr-config
sudo chown -R audiobookshelf:mediacenter config/audiobookshelf-config

echo "Done! It is recommended to reboot now."
echo "Done! It is recommended to reboot now."
1 change: 0 additions & 1 deletion update_containers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@
# if that isnt enough then reboot

docker compose pull
docker compose down
docker compose up -d
docker image prune -f

0 comments on commit 20317a9

Please sign in to comment.