forked from needo37/plex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplex.sh
29 lines (24 loc) · 1.37 KB
/
plex.sh
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
#!/bin/bash
##################
# VDR specific stuff!
#
# make the dirs, even though the first run of plex will try to create them
if [ "/tmp/novdrbundlesyet" ]; then
echo "no bundles, so we put them here"
mkdir -p '/config/Library/Application Support/Plex Media Server/Plug-ins'
mkdir -p '/config/Library/Application Support/Plex Media Server/Scanners/Movies'
# copy the plugins to the right place and also the scanner.py
cp -r '/tmp/plugins/VDR.bundle' '/config/Library/Application Support/Plex Media Server/Plug-ins/'
cp -r '/tmp/plugins/plex-yavdr-channel.bundle' '/config/Library/Application Support/Plex Media Server/Plug-ins/'
cp '/tmp/plugins/VDR.bundle/Scanners/Movies/VDR Recordings Scanner.py' '/config/Library/Application Support/Plex Media Server/Scanners/Movies'
# set +x to allow plex to run the plugins
chmod a+x '/config/Library/Application Support/Plex Media Server/Plug-ins/VDR.bundle/Contents/Code/__init__.py'
chmod a+x '/config/Library/Application Support/Plex Media Server/Plug-ins/plex-yavdr-channel.bundle/Contents/Code/__init__.py'
chmod a+x '/config/Library/Application Support/Plex Media Server/Scanners/Movies/VDR Recordings Scanner.py'
chown -R plex:plex /config/Library
touch /config/yavdrplugins_installed
##################
rm /tmp/novdrbundlesyet
fi
# usual start of the plex application
exec /sbin/setuser plex /usr/sbin/start_pms