-
Notifications
You must be signed in to change notification settings - Fork 11
/
config.template
105 lines (81 loc) · 4.05 KB
/
config.template
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/bin/bash
# shellcheck disable=SC2034
###############################################################################
# OPTIONS
###############################################################################
# Pool choice , 0 = unionfs, 1 = mergerfs mergerfs allows deletions for radarr/sonarr to prevent duplication on g-drive.
pool_choice=0
# Encrypt media (0 means no encryption)
encrypt_media=1
# Set your folder location within google drive where your media is stored. Empty means media files are in root
google_drive_media_directory=""
# Upload/Move flag, if set to move, cloudupload will use move instead of copy to move files immediately instead of after a week.
move_ind=0
# Mount user Id's. If necessary for acccess, Replace $(id with a different ID if you need to override.MergerFS tends to not need, unionfs sometimes does.
uid=$(id -u)
gid=$(id -g)
###############################################################################
# DIRECTORIES
###############################################################################
media_dir="INSERT_ROOT_DIR"
# Cloud directories
cloud_encrypt_dir="${media_dir}/.cloud-encrypt"
cloud_decrypt_dir="${media_dir}/.cloud-decrypt"
# Local directory
local_decrypt_dir="${media_dir}/.local-decrypt/Media"
plexdrive_temp_dir="${media_dir}/.local-decrypt/plexdrive"
# Media directory (FINAL)
local_media_dir="${media_dir}/media"
###############################################################################
# FS-Pooling
###############################################################################
ufs_bin="/usr/bin/unionfs"
mfs_bin="/usr/bin/mergerfs"
ufs_options="-o cow,allow_other,direct_io,nonempty,auto_cache,sync_read,uid=$uid,gid=$gid"
mfs_options="-o defaults,nonempty,allow_other,direct_io,use_ino,category.create=ff,category.search=ff,minfreespace=0,uid=$uid,gid=$gid"
###############################################################################
# PLEXDRIVE
###############################################################################
plexdrive_dir="${media_dir}/plexdrive"
plexdrive_bin="${plexdrive_dir}/plexdrive-linux-amd64"
mongo_database="plexdrive"
mongo_host="localhost"
mongo_user=""
mongo_password=""
plexdrive_options="--temp=${plexdrive_temp_dir} -o allow_other --clear-chunk-max-size=300G --clear-chunk-age=24h --chunk-size=10M"
###############################################################################
# RCLONE
###############################################################################
rclone_dir="${media_dir}/rclone"
rclone_bin="${rclone_dir}/rclone"
rclone_config="${rclone_dir}/rclone.conf"
rclone_options="--buffer-size 500M --checkers 16"
rclone_beta="0" # Set this to "1" if you want to live dangerous and try out rclone latest beta.
if [ "${pool_choice}" = "1" ]; then
rclone_mount_options="${rclone_options} --allow-non-empty --allow-other --max-read-ahead 30G"
else
rclone_mount_options="${rclone_options} --read-only --allow-non-empty --allow-other --max-read-ahead 30G"
fi
# Rclone endpoints
rclone_cloud_endpoint="gd-crypt:"
rclone_local_endpoint="local-crypt:"
upload_limit="0" # This is only used to check within cloudupload script. This number should be in GB and greater than 0 be activated.
move_limit="0" # This is only used to check within rmlocal script. This number should be in GB and greater than 0 be activated.
###############################################################################
# Plex (empty trash)
###############################################################################
plex_url="http://localhost:32400"
plex_token=""
###############################################################################
# MISC. CONFIG
###############################################################################
date_format="+%F@%T"
# Select to remove media files based on 'time', 'space' or 'instant'
#remove_files_based_on="instant"
#remove_files_based_on="time"
remove_files_based_on="space"
# Remove media files based on 'time'
remove_files_older_than=60 # In days
# Remove media files based on 'space'
remove_files_when_space_exceeds=500 # In Gigabytes
freeup_atleast=300 # In Gigabytes