Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
Charts
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
魏国强
Charts
Commits
6c8cc0b2
Commit
6c8cc0b2
authored
Dec 08, 2020
by
Waqar Ahmed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove plex-preferences file
parent
868900c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
64 deletions
+2
-64
test/plex/2.1.0/configs/41-plex-preferences
test/plex/2.1.0/configs/41-plex-preferences
+0
-64
test/plex/2.1.0/templates/NOTES.txt
test/plex/2.1.0/templates/NOTES.txt
+2
-0
No files found.
test/plex/2.1.0/configs/41-plex-preferences
deleted
100644 → 0
View file @
868900c8
#!/usr/bin/with-contenv bash
# This file is based off of the official 40-plex-first-run
# Here: https://github.com/plexinc/pms-docker/blob/master/root/etc/cont-init.d/40-plex-first-run
# It should live in /etc/cont-init.d/
# If we are debugging, enable trace
if
[
"
${
DEBUG
,,
}
"
=
"true"
]
;
then
set
-x
fi
function
getPref
{
local
key
=
"
$1
"
xmlstarlet sel
-T
-t
-m
"/Preferences"
-v
"@
${
key
}
"
-n
"
${
prefFile
}
"
}
function
setPref
{
local
key
=
"
$1
"
local
value
=
"
$2
"
count
=
"
$(
xmlstarlet sel
-t
-v
"count(/Preferences/@
${
key
}
)"
"
${
prefFile
}
"
)
"
count
=
$((
$count
+
0
))
if
[[
$count
>
0
]]
;
then
xmlstarlet ed
--inplace
--update
"/Preferences/@
${
key
}
"
-v
"
${
value
}
"
"
${
prefFile
}
"
else
xmlstarlet ed
--inplace
--insert
"/Preferences"
--type
attr
-n
"
${
key
}
"
-v
"
${
value
}
"
"
${
prefFile
}
"
fi
}
home
=
"
$(
echo
~plex
)
"
pmsApplicationSupportDir
=
"
${
PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR
:-${
home
}
/Library/Application Support
}
"
prefFile
=
"
${
pmsApplicationSupportDir
}
/Plex Media Server/Preferences.xml"
if
[
!
-z
"
${
ADVERTISE_IP
}
"
]
;
then
setPref
"customConnections"
"
${
ADVERTISE_IP
}
"
fi
if
[
!
-z
"
${
ALLOWED_NETWORKS
}
"
]
;
then
setPref
"allowedNetworks"
"
${
ALLOWED_NETWORKS
}
"
fi
# Set transcoder temp if not yet set
if
[
-z
"
$(
getPref
"TranscoderTempDirectory"
)
"
]
;
then
setPref
"TranscoderTempDirectory"
"/transcode"
fi
# Parse list of all exported variables that start with PLEX_PREFERENCE_
# The format of which is PLEX_PREFERENCE_<SOMETHING>="Key=Value"
# Where Key is the EXACT key to use in the Plex Preference file
# And Value is the EXACT value to use in the Plex Preference file for that key.
# Please note it looks like many of the key's are camelCase in some fashion.
# Additionally there are likely some preferences where environment variable injection
# doesn't really work for.
for
var
in
"
${
!PLEX_PREFERENCE_@
}
"
;
do
value
=
${
!var
}
PreferenceValue
=
${
value
#*=
}
PreferenceKey
=
${
value
%=*
}
setPref
$PreferenceKey
$PreferenceValue
done
# touch /.firstRunComplete
# echo "Plex Media Server first run setup complete"
echo
"Plex Media Server preferences update run complete"
\ No newline at end of file
test/plex/2.1.0/templates/NOTES.txt
View file @
6c8cc0b2
1. Get the application URL by running these commands:
https:node_ip:{{ .Values.plexServiceTCP.port }}/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment