mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
300bf767e4
linux: update patch to reuse built it functions for bubba3 and get LEDS to work plexmediaserver: update start_pms to use urmv5tel dirs instead of arm
52 lines
2.3 KiB
Bash
Executable file
52 lines
2.3 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
#defaults - change these parameters in /etc/conf.d/plexmediaserver
|
|
export PLEX_MEDIA_SERVER_USER=plex
|
|
export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=6
|
|
export PLEX_MEDIA_SERVER_HOME=/opt/plexmediaserver
|
|
export PLEX_MEDIA_SERVER_MAX_STACK_SIZE=3000
|
|
export PLEX_MEDIA_SERVER_TMPDIR=/tmp
|
|
export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR="${PLEX_MEDIA_SERVER_HOME}/Library/Application Support"
|
|
|
|
test -f /etc/conf.d/plexmediaserver && . /etc/conf.d/plexmediaserver
|
|
|
|
if [ ! -d "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR" ]
|
|
then
|
|
mkdir -p "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR"
|
|
chown -R ${PLEX_MEDIA_SERVER_USER} "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR"
|
|
if [ ! $? -eq 0 ]
|
|
then
|
|
echo "WARNING COULDN'T CREATE $PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR, MAKE SURE I HAVE PERMISSON TO DO THAT!"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
if [ ! -d "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Linux/armv5tel/Frameworks/" ]
|
|
then
|
|
mkdir -p "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Linux/armv5tel/Frameworks/"
|
|
chown -R ${PLEX_MEDIA_SERVER_USER} "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Linux/armv5tel/Frameworks/"
|
|
if [ ! $? -eq 0 ]
|
|
then
|
|
echo "WARNING COULDN'T CREATE $PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server/Plug-ins/Framework.bundle/Contents/Resources/Platforms/Linux/armv5tel/Frameworks, MAKE SURE I HAVE PERMISSON TO DO THAT!"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
if [ ! -d "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server/Logs" ]
|
|
then
|
|
mkdir -p "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server/Logs"
|
|
chown -R ${PLEX_MEDIA_SERVER_USER} "$PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server/Logs"
|
|
if [ ! $? -eq 0 ]
|
|
then
|
|
echo "WARNING COULDN'T CREATE $PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR/Plex Media Server/Logs, MAKE SURE I HAVE PERMISSON TO DO THAT!"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
|
|
export LD_LIBRARY_PATH="${PLEX_MEDIA_SERVER_HOME}"
|
|
export TMPDIR="${PLEX_MEDIA_SERVER_TMPDIR}"
|
|
|
|
ulimit -s $PLEX_MEDIA_SERVER_MAX_STACK_SIZE
|
|
|
|
cd ${PLEX_MEDIA_SERVER_HOME}; su -c "${PLEX_MEDIA_SERVER_HOME}/Plex\ Media\ Server &" ${PLEX_MEDIA_SERVER_USER}
|