-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #326 from pabloromeo/experimental
Migration to s6-overlay v3 and nginx listen ports for ipv4 and ipv6
- Loading branch information
Showing
60 changed files
with
147 additions
and
12 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion
3
pms/docker-mod/root/etc/nginx/sites-available/forward-proxy.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
pms/docker-mod/root/etc/s6-overlay/s6-rc.d/1-install-dependencies/run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
if which node > /dev/null | ||
then | ||
echo "**** node is installed, skipping... ****" | ||
else | ||
echo "**** install runtime packages ****" | ||
echo "**** apt-get update ****" | ||
apt-get update | ||
echo "**** install libatomic1, file, nginx ****" | ||
apt-get install -y libatomic1 file nginx | ||
echo "**** install 'n' ****" | ||
curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n | ||
echo "**** install nodejs ****" | ||
bash n lts | ||
fi |
1 change: 1 addition & 0 deletions
1
pms/docker-mod/root/etc/s6-overlay/s6-rc.d/1-install-dependencies/type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
oneshot |
1 change: 1 addition & 0 deletions
1
pms/docker-mod/root/etc/s6-overlay/s6-rc.d/1-install-dependencies/up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/etc/s6-overlay/s6-rc.d/1-install-dependencies/run |
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
oneshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/etc/s6-overlay/s6-rc.d/2-npm-install/run |
Empty file.
17 changes: 17 additions & 0 deletions
17
pms/docker-mod/root/etc/s6-overlay/s6-rc.d/3-install-transcoder-shim/run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
if file /usr/lib/plexmediaserver/'Plex Transcoder' | grep -iq ASCII ; then | ||
echo "**** Transcoder is already clusterplex, only update ****" | ||
else | ||
echo "**** Transcoder is still original, rename ****" | ||
mv /usr/lib/plexmediaserver/'Plex Transcoder' /usr/lib/plexmediaserver/originalTranscoder | ||
fi | ||
|
||
echo "**** Move shim to destination ****" | ||
cp /app/transcoder-shim.sh /usr/lib/plexmediaserver/'Plex Transcoder' | ||
|
||
echo "**** Make the shim executable ****" | ||
chmod +x /usr/lib/plexmediaserver/'Plex Transcoder' | ||
|
||
echo "**** Make sentinel.sh executable ****" | ||
chmod +x /app/sentinel.sh |
1 change: 1 addition & 0 deletions
1
pms/docker-mod/root/etc/s6-overlay/s6-rc.d/3-install-transcoder-shim/type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
oneshot |
1 change: 1 addition & 0 deletions
1
pms/docker-mod/root/etc/s6-overlay/s6-rc.d/3-install-transcoder-shim/up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/etc/s6-overlay/s6-rc.d/3-install-transcoder-shim/run |
Empty file.
15 changes: 15 additions & 0 deletions
15
pms/docker-mod/root/etc/s6-overlay/s6-rc.d/4-setup-nginx/run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
echo "**** unlink nginx default ****" | ||
unlink /etc/nginx/sites-enabled/default | ||
echo "**** link nginx forward-proxy ****" | ||
ln -s /etc/nginx/sites-available/forward-proxy.conf /etc/nginx/sites-enabled/forward-proxy.conf | ||
|
||
echo "**** configuring nginx (for Local Relay) forwarding ports ****" | ||
echo "PMS_PORT => '${PMS_PORT}'" | ||
echo "LOCAL_RELAY_PORT => '${LOCAL_RELAY_PORT}'" | ||
|
||
sed -i 's/_PMS_PORT/'"${PMS_PORT:-32400}"'/g' /etc/nginx/sites-available/forward-proxy.conf | ||
sed -i 's/_LOCAL_RELAY_PORT/'"${LOCAL_RELAY_PORT:-32499}"'/g' /etc/nginx/sites-available/forward-proxy.conf | ||
|
||
echo "**** nginx configuration complete ****" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
oneshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/etc/s6-overlay/s6-rc.d/4-setup-nginx/run |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
echo "**** starting nginx ****" | ||
/usr/sbin/nginx -g 'daemon off;' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
longrun |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/etc/s6-overlay/s6-rc.d/4-setup-nginx/run |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
echo "**** Running npm install ****" | ||
cd /app | ||
npm install |
File renamed without changes.
File renamed without changes.
17 changes: 17 additions & 0 deletions
17
worker/docker-mod/root/etc/s6-overlay/s6-rc.d/1-install-dependencies/run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
if which node > /dev/null | ||
then | ||
echo "**** node is installed, skipping... ****" | ||
else | ||
echo "**** install runtime packages ****" | ||
echo "**** apt-get update ****" | ||
apt-get update | ||
echo "**** install binutils, libatomic1, file, unzip ****" | ||
apt-get install -y binutils libatomic1 file unzip | ||
echo "**** install 'n' ****" | ||
curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n | ||
echo "**** install nodejs ****" | ||
bash n lts | ||
fi | ||
|
1 change: 1 addition & 0 deletions
1
worker/docker-mod/root/etc/s6-overlay/s6-rc.d/1-install-dependencies/type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
oneshot |
1 change: 1 addition & 0 deletions
1
worker/docker-mod/root/etc/s6-overlay/s6-rc.d/1-install-dependencies/up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/etc/s6-overlay/s6-rc.d/1-install-dependencies/run |
Empty file.
5 changes: 5 additions & 0 deletions
5
worker/docker-mod/root/etc/s6-overlay/s6-rc.d/2-npm-install/run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
echo "**** Running npm install ****" | ||
cd /app | ||
npm install |
1 change: 1 addition & 0 deletions
1
worker/docker-mod/root/etc/s6-overlay/s6-rc.d/2-npm-install/type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
oneshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/etc/s6-overlay/s6-rc.d/2-npm-install/run |
Empty file.
14 changes: 14 additions & 0 deletions
14
worker/docker-mod/root/etc/s6-overlay/s6-rc.d/3-install-shim/run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
if file /usr/lib/plexmediaserver/'Plex Media Server' | grep -iq ASCII ; then | ||
echo "**** Root executable is already clusterplex-worker, only update ****" | ||
else | ||
echo "**** Root executable is still original, rename ****" | ||
mv /usr/lib/plexmediaserver/'Plex Media Server' /usr/lib/plexmediaserver/pms_original | ||
fi | ||
|
||
echo "**** Move shim to destination ****" | ||
cp /app/start.sh /usr/lib/plexmediaserver/'Plex Media Server' | ||
|
||
echo "**** Make the shim executable ****" | ||
chmod +x /usr/lib/plexmediaserver/'Plex Media Server' |
1 change: 1 addition & 0 deletions
1
worker/docker-mod/root/etc/s6-overlay/s6-rc.d/3-install-shim/type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
oneshot |
1 change: 1 addition & 0 deletions
1
worker/docker-mod/root/etc/s6-overlay/s6-rc.d/3-install-shim/up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/etc/s6-overlay/s6-rc.d/3-install-shim/run |
Empty file.
13 changes: 13 additions & 0 deletions
13
worker/docker-mod/root/etc/s6-overlay/s6-rc.d/4-setup-codecs-dir/run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
echo "**** Setting up codecs directory ****" | ||
if [ -d "/codecs" ] | ||
then | ||
echo "Directory already present" | ||
else | ||
echo "Creating /codecs" | ||
mkdir -p /codecs | ||
fi | ||
|
||
echo "**** Changing ownership for /codecs ****" | ||
chown abc:abc /codecs |
1 change: 1 addition & 0 deletions
1
worker/docker-mod/root/etc/s6-overlay/s6-rc.d/4-setup-codecs-dir/type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
oneshot |
1 change: 1 addition & 0 deletions
1
worker/docker-mod/root/etc/s6-overlay/s6-rc.d/4-setup-codecs-dir/up
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/etc/s6-overlay/s6-rc.d/4-setup-codecs-dir/run |
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters