-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinit
executable file
·38 lines (33 loc) · 1.07 KB
/
init
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
DOCKER_ROOT="$HOME/docker"
DOCKER_ENV=".env"
mkdir -pv $DOCKER_ROOT
touch $DOCKER_ENV
mkdir -pv $DOCKER_ROOT/shared
mkdir -pv $DOCKER_ROOT/portainer
#mkdir -pv $DOCKER_ROOT/organizr
mkdir -pv $DOCKER_ROOT/transmission
mkdir -pv $DOCKER_ROOT/radarr
mkdir -pv $DOCKER_ROOT/sonarr
mkdir -pv $DOCKER_ROOT/plexms
mkdir -pv $DOCKER_ROOT/jackett
mkdir -pv $DOCKER_ROOT/bazarr
mkdir -pv $DOCKER_ROOT/heimdall
mkdir -pv $HOME/downloads
mkdir -pv $HOME/watch
mkdir -pv $HOME/media/movies
mkdir -pv $HOME/media/tvshows
# Create .env file for docker-compose
echo "PUID=`id -u $USER`" > $DOCKER_ENV
echo "PGID=`getent group docker | awk -F: '{printf $3}'`" >> $DOCKER_ENV
echo "TZ=`cat /etc/timezone`" >> $DOCKER_ENV
echo "USERDIR=`echo $HOME`" >> $DOCKER_ENV
echo "REMOTEDIR=/mnt/media" >> $DOCKER_ENV
read -p 'Plex server claim (https://www.plex.tv/claim/): ' plex_claim
echo "PLEX_CLAIM=$plex_claim" >> $DOCKER_ENV
echo "PLEX_SERVER_ADDR=`hostname -I | awk '{print $1}'`" >> $DOCKER_ENV
echo ""
echo "Created .env file:"
echo "`awk -F':' '{ print "...", $1 }' $DOCKER_ENV`"
echo ""
echo "Done!"