-
-
Save EvilBMP/9844807 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # reload after change /etc/init.d/Qthttpd.sh restart | |
| php_value magic_quotes_gpc off | |
| AuthName "Serviio - Admin Restricted Access (Use NAS admin credentials)" | |
| AuthType Basic | |
| # AuthUserFile /mnt/HDA_ROOT/rootfs_2_3_6/root/.htpasswd | |
| AuthUserFile /mnt/HDA_ROOT/.config/shadow | |
| AuthGroupFile /dev/null | |
| # require valid-user | |
| <limit GET POST> | |
| require user admin | |
| </Limit> |
This file contains hidden or 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
| #!/bin/sh | |
| [[ -f /share/MD0_DATA/.qpkg/autorun/autorun-serviio.sh ]] && /share/MD0_DATA/.qpkg/autorun/autorun-serviio.sh & |
This file contains hidden or 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
| #!/bin/bash | |
| set -e | |
| ### ====================================================================== ### | |
| ## ## | |
| ## Serviio install codecs ## | |
| ## ## | |
| ### ====================================================================== ### | |
| # Example usage: | |
| # ssh on to qnap (ssh [email protected]) | |
| # > cd /share/MD0_DATA/Public | |
| # > git clone https://gist.github.com/5324815.git updating_codecs | |
| # > sh /share/MD0_DATA/Public/updating_codecs/install_codecs.sh | |
| CODEC_DIRECTORY='/share/MD0_DATA/.codecs' | |
| PREFIX='/opt' | |
| URL_YASM='http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz' | |
| URL_XVID='http://downloads.xvid.org/downloads/xvidcore-1.3.2.tar.gz' | |
| URL_FAAC='http://downloads.sourceforge.net/faac/faac-1.28.tar.gz' | |
| URL_LIBVPX='https://webm.googlecode.com/files/libvpx-v1.1.0.tar.bz2' | |
| URL_FREETYPE='http://downloads.sourceforge.net/project/freetype/freetype2/2.4.11/freetype-2.4.11.tar.bz2' | |
| URL_OGG='http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz' | |
| URL_VORBIS='http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz' | |
| URL_THEORA='http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2' | |
| URL_FRIBIDI='http://fribidi.org/download/fribidi-0.19.5.tar.bz2' | |
| URL_LIBASS='http://libass.googlecode.com/files/libass-0.10.1.tar.gz' | |
| URL_OPENSSL='http://www.openssl.org/source/openssl-1.0.1e.tar.gz' | |
| URL_FDK='http://downloads.sourceforge.net/project/opencore-amr/fdk-aac/fdk-aac-0.1.1.tar.gz' | |
| URL_OPENCORE='http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.3.tar.gz' | |
| URL_SERVIIO_LAME='http://download.serviio.org/opensource/lame-3.99.5.tar.gz' | |
| #URL_SERVIIO_RTMPDUMP='http://download.serviio.org/opensource/rtmpdump.tar.gz' | |
| #URL_SERVIIO_FFMPEG='http://download.serviio.org/opensource/ffmpeg-1.1.1.tar.gz' | |
| EDGE_ENCA='git://gitorious.org/enca/enca.git' | |
| EDGE_X264='git://git.videolan.org/x264.git' | |
| EDGE_RTMPDUMP='git://git.ffmpeg.org/rtmpdump' | |
| EDGE_FFMPEG='git://source.ffmpeg.org/ffmpeg.git' | |
| export PATH=/opt/bin:/opt/sbin:$PATH | |
| create_symlink() { | |
| local symlink="$1" | |
| local symlink_source="$2" | |
| echo ">>> Creating symlink: ${symlink} -> ${symlink_source}" | |
| ln -f -s $symlink_source $symlink | |
| } | |
| if [[ $CLEAN = 'true' ]]; then | |
| echo '--> Cleaning existing directory' | |
| rm -rf $CODEC_DIRECTORY | |
| fi; | |
| echo ">>> Processing codec installation: " | |
| echo ">>> Installing required iPkg dependencies" | |
| ipkg update | |
| ipkg install bash | |
| ipkg install util-linux | |
| ipkg install gcc | |
| ipkg install glib | |
| ipkg install gawk | |
| ipkg install sed | |
| ipkg install coreutils | |
| ipkg install autoconf | |
| ipkg install automake | |
| ipkg install git | |
| ipkg install make | |
| ipkg install perl | |
| ipkg install openssl-dev | |
| ipkg install pkgconfig | |
| ipkg install fontconfig | |
| create_symlink '/bin/bash' '/opt/bin/bash' | |
| # Only works with LD_LIBRARY_PATH=/opt/lib ./ffmpeg (or adding /opt/lib to /etc/ld.so.conf with running ldconfig after) | |
| if [[ $(grep -q "/opt/lib" "/etc/ld.so.conf" && echo $?) = 0 ]]; then | |
| echo ' --> /opt/lib already loaded in /etc/ls.so.conf' | |
| else | |
| echo "/opt/lib" >> /etc/ld.so.conf | |
| fi; | |
| ldconfig | |
| echo ">> Loading codecs into ${CODEC_DIRECTORY}" | |
| mkdir -p $CODEC_DIRECTORY | |
| cd $CODEC_DIRECTORY | |
| if [ ! -d "yasm-1.2.0" ]; then | |
| echo ">>> Installing YASM" | |
| curl -C - -L -O $URL_YASM | |
| tar -xvzf yasm-1.2.0.tar.gz | |
| cd yasm-1.2.0 | |
| ./configure --prefix=$PREFIX | |
| make | |
| make install | |
| cd $CODEC_DIRECTORY | |
| rm -f yasm-1.2.0.tar.gz | |
| else | |
| echo "--- Skipping Yasm" | |
| fi; | |
| if [ ! -d "x264" ]; then | |
| echo ">>> Installing x264" | |
| git clone $EDGE_X264 x264 | |
| cd x264 | |
| ./configure --prefix=$PREFIX --enable-shared | |
| make | |
| make install | |
| cd $CODEC_DIRECTORY | |
| else | |
| echo "--- Skipping x264" | |
| fi; | |
| if [ ! -d "xvidcore" ]; then | |
| echo ">>> Installing XVid Core" | |
| curl -C - -L -O $URL_XVID | |
| tar -xvzf xvidcore-1.3.2.tar.gz | |
| cd xvidcore/build/generic | |
| ./configure --prefix=$PREFIX | |
| make | |
| make install | |
| cd $CODEC_DIRECTORY | |
| rm -f xvidcore-1.3.2.tar.gz | |
| else | |
| echo "--- Skipping Xvid Core" | |
| fi; | |
| if [ ! -d "libvpx-v1.1.0" ]; then | |
| echo ">>> Installing libvpx" | |
| curl -C - -L -O $URL_LIBVPX | |
| tar -xjvf libvpx-v1.1.0.tar.bz2 | |
| cd libvpx-v1.1.0 | |
| ./configure --prefix=$PREFIX --as=yasm --enable-vp8 --enable-postproc --enable-runtime-cpu-detect --enable-shared | |
| make | |
| make install | |
| cd $CODEC_DIRECTORY | |
| rm -rf libvpx-v1.1.0.tar.bz2 | |
| else | |
| echo "--- Skipping libvpx" | |
| fi; | |
| if [ ! -d "lame-3.99.5.tar.gz" ]; then | |
| echo ">>> Compiling LAME" | |
| curl -C - -L -O $URL_SERVIIO_LAME | |
| tar -xvzf lame-3.99.5.tar.gz | |
| cd lame-3.99.5 | |
| ./configure --prefix=$PREFIX --disable-frontend --enable-shared | |
| make | |
| make install | |
| cd $CODEC_DIRECTORY | |
| rm -f lame-3.99.5.tar.gz | |
| else | |
| echo "--- Skipping LAME" | |
| fi; | |
| if [ ! -d "faac-1.28" ]; then | |
| echo ">>> Installing Faac" | |
| curl -L -O $URL_FAAC | |
| tar -xvzf faac-1.28.tar.gz | |
| cd faac-1.28 | |
| create_symlink '/usr/lib/libstdc++.so' '/opt/lib/libstdc++.so' | |
| ./configure --prefix=$PREFIX --enable-shared | |
| make | |
| make install | |
| cd $CODEC_DIRECTORY | |
| rm -f faac-1.28.tar.gz | |
| else | |
| echo "--- Skipping faac" | |
| fi; | |
| if [ ! -d "freetype-2.4.11" ]; then | |
| echo ">>> Installing freetype" | |
| curl -C - -L -O $URL_FREETYPE | |
| tar -xjvf freetype-2.4.11.tar.bz2 | |
| cd freetype-2.4.11 | |
| ./configure --prefix=$PREFIX --enable-shared | |
| make | |
| make install | |
| cd $CODEC_DIRECTORY | |
| rm -f freetype-2.4.11.tar.bz2 | |
| else | |
| echo "--- Skipping freetype" | |
| fi; | |
| if [ ! -d "libogg-1.3.0" ]; then | |
| echo ">>> Installing libogg" | |
| curl -C - -L -O $URL_OGG | |
| tar -xvzf libogg-1.3.0.tar.gz | |
| cd libogg-1.3.0 | |
| ./configure --prefix=$PREFIX --enable-shared | |
| make | |
| make install | |
| cd $CODEC_DIRECTORY | |
| rm -f libogg-1.3.0.tar.gz | |
| else | |
| echo "--- Skipping libogg" | |
| fi; | |
| if [ ! -d "libvorbis-1.3.3" ]; then | |
| echo ">>> Installing libvorbis" | |
| curl -C - -L -O $URL_VORBIS | |
| tar -xzvf libvorbis-1.3.3.tar.gz | |
| cd libvorbis-1.3.3 | |
| ./configure --prefix=$PREFIX --enable-shared | |
| make | |
| make install | |
| cd $CODEC_DIRECTORY | |
| rm -f libvorbis-1.3.3.tar.gz | |
| else | |
| echo "--- Skipping libvorbis" | |
| fi; | |
| if [ ! -d "libtheora-1.1.1" ]; then | |
| echo ">>> Installing libtheora" | |
| curl -C - -L -O $URL_THEORA | |
| tar -xjvf libtheora-1.1.1.tar.bz2 | |
| cd libtheora-1.1.1 | |
| ./configure --prefix=$PREFIX --enable-shared --with-ogg=$PREFIX --with-vorbis=$PREFIX | |
| make | |
| make install | |
| cd $CODEC_DIRECTORY | |
| rm -f libtheora-1.1.1.tar.bz2 | |
| else | |
| echo "--- Skipping libtheora" | |
| fi; | |
| if [ ! -d "fribidi-0.19.5" ]; then | |
| echo ">>> Installing fribidi" | |
| curl -C - -L -O $URL_FRIBIDI | |
| tar -xjvf fribidi-0.19.5.tar.bz2 | |
| cd fribidi-0.19.5 | |
| ./configure --prefix=$PREFIX --enable-shared | |
| make | |
| make install | |
| cd $CODEC_DIRECTORY | |
| rm -f fribidi-0.19.5.tar.bz2 | |
| else | |
| echo "--- Skipping fribidi" | |
| fi; | |
| if [ ! -d "enca" ]; then | |
| echo ">>> Installing enca" | |
| git clone $EDGE_ENCA | |
| cd enca | |
| ./configure --prefix=$PREFIX --enable-shared | |
| make | |
| make check | |
| make install | |
| else | |
| echo "--- Skipping enca" | |
| fi; | |
| if [ ! -d "libass-0.10.1" ]; then | |
| echo ">>> Installing libass" | |
| curl -C - -L -O $URL_LIBASS | |
| tar -xzvf libass-0.10.1.tar.gz | |
| cd libass-0.10.1 | |
| ./configure --prefix=$PREFIX --enable-shared | |
| make | |
| make install | |
| cd $CODEC_DIRECTORY | |
| rm -f libass-0.10.1.tar.gz | |
| else | |
| echo "--- Skipping libass" | |
| fi; | |
| if [ ! -d "openssl-1.0.1e" ]; then | |
| echo ">>> Compiling OpenSSL" | |
| curl -C - -L -O $URL_OPENSSL | |
| tar -xzvf openssl-1.0.1e.tar.gz | |
| cd openssl-1.0.1e | |
| ./config | |
| make | |
| rm -f openssl-1.0.1e.tar.gz | |
| cd $CODEC_DIRECTORY | |
| else | |
| echo "--- Skipping OpenSSL" | |
| fi; | |
| if [ ! -d "fdk-aac-0.1.1" ]; then | |
| echo ">>> Installing FDK-AAC" | |
| curl -C - -L -O $URL_FDK | |
| tar -xvzf fdk-aac-0.1.1.tar.gz | |
| cd fdk-aac-0.1.1 | |
| ./configure --prefix=$PREFIX | |
| make prefix=$PREFIX | |
| make prefix=$PREFIX install | |
| ldconfig | |
| cd $CODEC_DIRECTORY | |
| rm -f fdk-aac-0.1.1.tar.gz | |
| else | |
| echo "--- Skipping FDK-AAC" | |
| fi; | |
| if [ ! -d "opencore-amr-0.1.3" ]; then | |
| echo ">>> Installing Opencore AMR" | |
| curl -C - -L -O $URL_OPENCORE | |
| tar -xvzf opencore-amr-0.1.3.tar.gz | |
| cd opencore-amr-0.1.3 | |
| ./configure --prefix=$PREFIX | |
| make prefix=$PREFIX | |
| make prefix=$PREFIX install | |
| ldconfig | |
| cd $CODEC_DIRECTORY | |
| rm -f opencore-amr-0.1.3.tar.gz | |
| else | |
| echo "--- Skipping Opencore AMR" | |
| fi; | |
| if [ ! -d "rtmpdump" ]; then | |
| echo ">>> Compiling libRTMP" | |
| git clone $EDGE_RTMPDUMP | |
| cd rtmpdump | |
| make SYS=posix prefix=$PREFIX | |
| make SYS=posix prefix=$PREFIX install | |
| cd librtmp | |
| sed -i'.bak' '/URL/d' librtmp.pc | |
| cd $CODEC_DIRECTORY | |
| else | |
| echo "--- Skipping libRTMP" | |
| fi; | |
| export PKG_CONFIG_PATH=/usr/lib/pkgconfig:$CODEC_DIRECTORY/openssl-1.0.1e:$CODEC_DIRECTORY/rtmpdump/librtmp | |
| pkg-config --exists --print-errors librtmp | |
| if [ ! -d "ffmpeg" ]; then | |
| echo ">>> Installing FFMPeg" | |
| git clone $EDGE_FFMPEG ffmpeg | |
| cd ffmpeg | |
| ldconfig | |
| if [ -e 'ffmpeg' ]; then | |
| #existing install | |
| make clean | |
| fi; | |
| ./configure --prefix=/share/MD0_DATA/.qpkg/Serviio/opt \ | |
| --libdir=/share/MD0_DATA/.qpkg/Serviio/opt/lib \ | |
| --disable-shared \ | |
| --disable-ffserver \ | |
| --disable-ffplay \ | |
| --enable-static \ | |
| --enable-pthreads \ | |
| --enable-libmp3lame \ | |
| --enable-libfaac \ | |
| --enable-libfreetype \ | |
| --enable-libtheora \ | |
| --enable-libvorbis \ | |
| --enable-libvpx \ | |
| --enable-libx264 \ | |
| --enable-libxvid \ | |
| --enable-librtmp \ | |
| --enable-fontconfig \ | |
| --enable-hardcoded-tables \ | |
| --enable-avresample \ | |
| --enable-libass \ | |
| --enable-libfdk-aac \ | |
| --enable-libopencore-amrnb \ | |
| --enable-libopencore-amrwb \ | |
| --enable-gpl \ | |
| --enable-postproc \ | |
| --enable-version3 \ | |
| --enable-nonfree \ | |
| --extra-cflags='-I/opt/include' --extra-ldflags='-L/opt/lib' | |
| make prefix='/share/MD0_DATA/.qpkg/Serviio/opt' | |
| make prefix='/share/MD0_DATA/.qpkg/Serviio/opt' install | |
| rm -f /opt/bin/ffmpeg | |
| create_symlink '/opt/bin/ffmpeg' '/share/MD0_DATA/.qpkg/Serviio/opt/bin/ffmpeg' | |
| cd $CODEC_DIRECTORY | |
| else | |
| echo "--- Skipping FFMpeg" | |
| fi; | |
| echo " >>> Done ;)" |
This file contains hidden or 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
| #!/bin/sh -e | |
| set -e | |
| #How to add to Qnap TS-439 (unmounting is very important!): | |
| # http://wiki.qnap.com/wiki/Running_Your_Own_Application_at_Startup | |
| # 1. SSH onto box as admin (then run the following commands) to create the autorun.sh | |
| # mkdir -p /share/MD0_DATA/.qpkg/autorun | |
| # cd /share/MD0_DATA/.qpkg/autorun/ | |
| # touch autorun-serviio.sh | |
| # chmod +x autorun-serviio.sh | |
| # 2. vi /share/MD0_DATA/.qpkg/autorun/autorun-serviio.sh | |
| # 3. <paste in the contents of this file> | |
| # 4. Load this file via QNap auto start flash (only required to do this first time): | |
| # 5. mount -t ext2 /dev/sdx6 /tmp/config | |
| # 6. vi /tmp/config/autorun.sh | |
| # 4. <paste in the next 2 lines, to ensure it only runs if the file exists, without the first hash, (see autorun.sh)> | |
| # #!/bin/sh | |
| #[[ -f /share/MD0_DATA/.qpkg/autorun/autorun-serviio.sh ]] && /share/MD0_DATA/.qpkg/autorun/autorun-serviio.sh & | |
| # 5. chmod +x /tmp/config/autorun.sh | |
| # 6. umount /tmp/config | |
| write_to_log() { | |
| local message="$1" | |
| local log_type="0" | |
| #0 = information, 1 = warning, 2 = error | |
| if [[ "$2" != '' ]]; then | |
| local log_type="$2" | |
| fi; | |
| /sbin/log_tool --append "[serviio-autorun] ${message}" --type $log_type | |
| } | |
| write_to_log ">> Starting autorun-serviio.sh script <<" | |
| #Serviio Custom startup for source built FFMpeg | |
| create_symlink() { | |
| local symlink="$1" | |
| local symlink_source="$2" | |
| write_to_log "Creating symlink: ${symlink} -> ${symlink_source}" | |
| ln -f -s $symlink_source $symlink | |
| } | |
| create_symlink '/bin/bash' '/opt/bin/bash' | |
| if [[ $(grep -q "/opt/lib" "/etc/ld.so.conf" && echo $?) = 0 ]]; then | |
| write_to_log "/opt/lib already present in /etc/ld.so.conf" | |
| else | |
| write_to_log "Creating /opt/lib link in /etc/ld.so.conf" | |
| echo "/opt/lib" >> /etc/ld.so.conf | |
| fi; | |
| SERVIIO_BIN_PATH="/opt/bin:/opt/sbin" | |
| if [[ "$PATH" != *"$SERVIIO_BIN_PATH"* ]]; then | |
| write_to_log "Updating PATH to include: ${SERVIIO_BIN_PATH}" | |
| echo "#====Serviio Required elements for compiled source====#" >> /etc/profile | |
| echo "export PATH=$SERVIIO_BIN_PATH:\$PATH" >> /etc/profile | |
| echo "ldconfig" >> /etc/profile | |
| echo "#/====Serviio Required elements for compiled source====#" >> /etc/profile | |
| export PATH=$SERVIIO_BIN_PATH:$PATH | |
| fi; | |
| CODEC_DIRECTORY='/share/MD0_DATA/.codecs' | |
| if [[ "$PKG_CONFIG_PATH" != *"$CODEC_DIRECTORY/rtmpdump/librtmp"* ]]; then | |
| write_to_log "Updating PKG_CONFIG_PATH to include custom compiled librtmp (${CODEC_DIRECTORY})" | |
| echo "#====Serviio Required elements for custom librtmp====#" >> /etc/profile | |
| echo "export PKG_CONFIG_PATH=/usr/lib/pkgconfig:\$CODEC_DIRECTORY/openssl-1.0.1e:\$CODEC_DIRECTORY/rtmpdump/librtmp" >> /etc/profile | |
| echo "#/====Serviio Required elements for custom librtmp====#" >> /etc/profile | |
| export PKG_CONFIG_PATH=/usr/lib/pkgconfig:$CODEC_DIRECTORY/openssl-1.0.1e:$CODEC_DIRECTORY/rtmpdump/librtmp | |
| fi; | |
| write_to_log ">> Completed autorun-serviio.sh script <<" |
This file contains hidden or 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
| #!bin/sh -e | |
| set -e | |
| # Following instructions here : | |
| # http://forum.qnap.com/viewtopic.php?f=252&t=45994&start=435 | |
| # For updating to latest Serviio | |
| #Run from a mounted directory of Qnap | |
| # Turn off the Serviio service | |
| # Eg. Open volume on mac | |
| # cd /Volumes/Public/UpdateServiio | |
| # ssh on to qnap and cd to the location of this script (ssh [email protected].?) | |
| # first run: | |
| # RUN_BACKUP=true sh update_serviio.sh | |
| # run (in case of errors) : | |
| # sh update_serviio.sh | |
| LOG_PREFIX=" >> " | |
| UPDATE_SERVIIO_DIR="/share/MD0_DATA/.update_serviio" | |
| if [[ $CLEAN = 'true' ]]; then | |
| echo '--> Cleaning existing directory' | |
| rm -rf $UPDATE_SERVIIO_DIR | |
| fi; | |
| echo "${LOG_PREFIX}Hope you've turned off Serviio!" | |
| if [[ $RUN_BACKUP = 'true' ]]; then | |
| echo "${LOG_PREFIX}Backing up current Serviio" | |
| mkdir -p '/share/MD0_DATA/.qpkg_backup' | |
| mkdir -p '/share/MD0_DATA/.qpkg_backup/Serviio' | |
| mkdir -p '/share/MD0_DATA/.qpkg_backup/opt/lib' | |
| mkdir -p '/share/MD0_DATA/.qpkg_backup/web_ui' | |
| cp -fR /share/MD0_DATA/.qpkg/Serviio /share/MD0_DATA/.qpkg_backup | |
| cp -f /share/MD0_DATA/.qpkg/Serviio/opt/bin/ffmpeg /share/MD0_DATA/.qpkg_backup/ffmpeg | |
| cp -fR /share/MD0_DATA/.qpkg/Serviio/opt/lib /share/MD0_DATA/.qpkg_backup | |
| cp -fR /share/MD0_DATA/.qpkg/Serviio/web_ui /share/MD0_DATA/.qpkg_backup | |
| else | |
| echo "${LOG_PREFIX}Skipping backup. I hope you have one yo!" | |
| fi; | |
| echo "${LOG_PREFIX}Updating core Serviio files" | |
| #Download latest version | |
| if ! [ -f 'serviio-latest.tar.gz' ]; then | |
| curl -C - -L -o 'serviio-latest.tar.gz' http://download.serviio.org/releases/serviio-1.2.1-linux.tar.gz | |
| fi; | |
| tar -zxvf serviio-latest.tar.gz | |
| #cp -fR /source/files /dest | |
| cp -fR serviio-1.2.1/bin /share/MD0_DATA/.qpkg/Serviio | |
| cp -fR serviio-1.2.1/config /share/MD0_DATA/.qpkg/Serviio | |
| cp -fR serviio-1.2.1/lib /share/MD0_DATA/.qpkg/Serviio | |
| echo "${LOG_PREFIX}Removing existing plugins" | |
| rm -rf /share/MD0_DATA/.qpkg/Serviio/plugins/*.groovy | |
| if ! [ -f 'plugins.zip' ]; then | |
| curl -C - -L -o 'plugins.zip' http://xmantium.com/serviio/plugins-latest.zip | |
| fi; | |
| mkdir -p plugins | |
| /opt/bin/unzip -o plugins.zip -d plugins | |
| echo "${LOG_PREFIX}Adding updated plugins" | |
| cp -fR plugins /share/MD0_DATA/.qpkg/Serviio | |
| echo "${LOG_PREFIX}Done!" | |
| echo "${LOG_PREFIX}Next steps :" | |
| echo "${LOG_PREFIX} : -> Update web_ui (see update_webui.sh)" | |
| echo "${LOG_PREFIX} : -> Update codecs from source (see install_codecs.sh)" | |
| echo "${LOG_PREFIX} : -> Restart the service!" | |
This file contains hidden or 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
| #!bin/sh -e | |
| set -e | |
| #Simple script to update only the web_ui based on a github repo/fork | |
| LOG_PREFIX=" >> " | |
| UPDATE_SERVIIO_DIR="/share/MD0_DATA/.update_serviio_webui" | |
| echo "${LOG_PREFIX}Updating web-ui from github" | |
| rm -rf $UPDATE_SERVIIO_DIR | |
| mkdir -p $UPDATE_SERVIIO_DIR | |
| cd $UPDATE_SERVIIO_DIR | |
| if [[ ! -f 'webui.zip' ]]; then | |
| curl -C - --insecure -L -o 'webui.zip' 'https://nodeload.github.com/SwoopX/Web-UI-for-Serviio/zip/master' | |
| fi; | |
| /opt/bin/unzip -o webui.zip | |
| echo "${LOG_PREFIX}Clearing existing web_ui" | |
| rm -rf /share/MD0_DATA/.qpkg/Serviio/web_ui | |
| mv 'Web-UI-for-Serviio-master' 'web_ui' | |
| echo "${LOG_PREFIX}Sending new web_ui" | |
| cp -fR 'web_ui' '/share/MD0_DATA/.qpkg/Serviio' | |
| cd $UPDATE_SERVIIO_DIR | |
| echo "TODO: Copy the .htaccess file into web_ui too to ensure authenticated access" | |
| echo "${LOG_PREFIX}Done! Go and restart the service!" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment