Recent Posts

Pages: [1] 2
1
Video Discussion / The Ferret Adventures: Daisy vs Cobra
« Last post by 3dhomejoe on November 11, 2016, 12:36:12 am »
This can't end well... Can it?



Direct Link to video: https://youtu.be/dU-YOCvT7bE
2
Code Snippets / [Debian] Plex Auto Updater
« Last post by 3dhomejoe on November 06, 2016, 12:27:20 am »
This script below allows you to create a cron job to auto update your Plex server running on Debian/Ubuntu. The script will automatically check to see if anyone is streaming before updating.

To find your plex token, you can login to your server and go to the update tab and right click and copy the "Please install manually" link address. In this address you will find your plex token at the end.

Code: [Select]
#!/bin/bash
plextoken="removed"
logpath="/var/log/plex_updater.log"
{
echo "###########################"
echo "#"
echo "# $(date)"
echo "#"
echo "# Checking if any movies are being watched"
sessions=$(curl -s http://127.0.0.1:32400/status/sessions?X-Plex-Token=$plextoken | grep "MediaContainer size" | awk -F'[\"]' '{print $2}')
if (($sessions < 1))
then
echo "#"
echo "# No movies are currently being streamed"
echo "#"
echo "# downloading plex.deb"
wget -O /root/plex.deb "https://plex.tv/downloads/latest/1?channel=8&build=linux-ubuntu-x86_64&distro=ubuntu&X-Plex-Token=$plextoken"
echo "#"
echo "# comparing versions"
newplex="$(dpkg-deb -f /root/plex.deb Version)"
currentplex="$(dpkg-query --show -f='${Version}' plexmediaserver)"
echo "# currently installed version is $currentplex"
echo "# downloaded version is $newplex"
/usr/bin/dpkg --compare-versions $newplex gt $currentplex
if (($? < 1))
then
        echo "#"
        echo "# $newplex is greater than $currentplex"
        echo "# installing downloaded plex"
        echo "#"
        /usr/bin/dpkg -i /root/plex.deb
        echo "#"
        echo "# renaming downloaded package to plex.$newplex.deb"
        mv /root/plex.deb /root/plex.$newplex.deb
        echo "#"
else
        echo "#"
        echo "# $newplex is not greater than $currentplex"
        echo "# deleting downloaded package"
        rm plex.deb
fi
else
echo "#"
echo "# A movie is currently being streamed, will not check on upgrade"
fi
echo "#"
echo "###########################"
} >> $logpath

You can also find this code on Github https://github.com/3dhomejoe/ThepHuck/tree/master/PlexUpdater

Credit for the initial script goes go ThepHuck.
Source: https://github.com/ThepHuck/ThepHuck/tree/master/PlexUpdater
Source: http://thephuck.com/scripts/automatic-plex-media-server-update-script-for-linuxubuntu/
3
Video Discussion / The Ferret Adventures: Ferret Slide
« Last post by 3dhomejoe on October 30, 2016, 06:01:01 am »
Daisy was trying to hide! And then she started to slide right out of the container!



Direct Link to video: https://youtu.be/XVWhm8BJnTg
4
Video Discussion / The Ferret Adventures: Dumping the Water
« Last post by 3dhomejoe on October 19, 2016, 06:10:01 am »
Daisy decided that water does not have enough flavor! She decided it was time to get rid of it!



Direct Link to video: https://youtu.be/By3w6TaXhwI
5
Off Topic / Re: Test
« Last post by testuser on October 18, 2016, 10:31:56 pm »
Test attachment
6
Video Discussion / The Ferret Adventures: Thirsty Daisy
« Last post by 3dhomejoe on October 14, 2016, 07:25:58 pm »
Daisy has been spotted in the bathroom with a large cup of water!



Direct Link to video: https://youtu.be/9mSrkdbCeKI
7
Off Topic / Re: Test
« Last post by testuser on October 14, 2016, 05:34:17 pm »
Another Test
8
Off Topic / Re: Test
« Last post by testuser on October 14, 2016, 05:31:46 pm »
Testing again
9
Off Topic / Re: Test
« Last post by testuser on October 14, 2016, 12:28:28 am »
Another Test
10
Off Topic / Test
« Last post by testuser on October 13, 2016, 11:49:49 pm »
This is a test thread. Nothing exciting here.
Pages: [1] 2