Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - 3dhomejoe

Pages: [1]
1
Video Discussion / The Ferret Adventures: Daisy vs Cobra
« 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
« 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
« 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
« 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
Video Discussion / The Ferret Adventures: Thirsty Daisy
« 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

6
Video Discussion / The Ferret Adventures: The Kitchen Counter
« on: October 13, 2016, 11:19:34 pm »
As seen below, Daisy goes on an adventure to the Kitchen Counter.



Direct Link to video: https://youtu.be/AV8mn5E0yyI

Pages: [1]