Home » Home Server » How to make CouchPotato auto update to new release?

How to make CouchPotato auto update to new release?

Typically CouchPotato update to new release is done manually but in this post I will show you how to make CouchPotato auto update itself on Linux. CouchPotato, an awesome little app that automates movie downloads, has been covered extensively by us, including installation (Windows / Ubuntu), configuration, and uninstallation. CouchPotato autoupdate can save time as it happens in the background without any user interaction. Plus, you will always have the latest and the greatest, including any security patches. So let us see how to enable CouchPotato auto update on Linux. [Read: 5 Best Usenet Search providers for Sick Beard and CouchPotato]

CouchPotato Update Notification

When an update is available, CouchPotato app notifies you by throwing a notification at the bottom of Couch Potato web interface.

CouchPotato Update Notification
CouchPotato Update Notification

Depending on how you configured CouchPotato, you may also receive an email notification to upgrade CouchPotato. [Read: Simplify downloading movies using CouchPotato Firefox plugin]

CouchPotato Upgrade Notification Email
CouchPotato Upgrade Notification Email

Then you login into your CouchPotato webui and click update. But what if you could auto update CouchPotato when updates are available without you doing anything?

Create CouchPotato Auto Update Script

As described in my CouchPotato installation guide, you can always stop CouchPotato, update it using the git pull, and restart it manually from the commandline. This process can be simplified by creating an update script.

Provider Rating Features Monthly Yearly
Newshosting
>3000 days, unlimited, SSL, VPN $9.99 $99.99 ($8.33 / month)
editors pick
Eweka
>3000 days, unlimited, SSL, EU Servers €7,50 (Special!!!)  
NewsDemon
>3000 days, unlimited, SSL, VPN $7.50  
Astraweb
>2800 days, unlimited, SSL $8.00 $96.00 ($8.00 / month)
For more plans that may fit your needs please read our Usenet plan selection guide.

Note that for this to work, you will have to have installed CouchPotato following our guide and your CouchPotato should be installed under .couchpotato in your home folder. If your CouchPotato app is installed in a different location then this should be reflected in the /etc/default/couchpotato file.

Create a file (using nano) or your favorite text editor and copy the following contents to it. Change USERNAME to your username. Save the file as couchpotato-updater.sh in your home folder (or anywhere you like).

#!/bin/bash
# CouchPotato Auto Update Script from htpcBeginner
sudo /etc/init.d/couchpotato stop
sleep 10
cd /home/USERNAME/.couchpotato
git pull
sudo /etc/init.d/couchpotato start

Basically, what this CouchPotato auto update script does is that it stops CouchPotato and moves to CouchPotato folder. Then issues the CouchPotato udpate git command to pull latest files and restarts CouchPotato. [Read: CouchPotato Chrome extension – easily add movies to download queue]

Next, cd in your home folder (or where you saved the file) and give the script execute permission using the following command:

sudo chmod 755 couchpotato-updater.sh

Now anytime you want to update CouchPotato, all your have to do is move to where the CouchPotato autoupdate script is saved and issue the following command:

sudo ./couchpotato-updater.sh

Don’t ignore the sudo and the dot in the front. This is all fine and dandy but how do I auto upgrade CouchPotato? That’s next. [Read: CouchPotato Apache reverse proxy]

Autorun CouchPotato Update using Cron

Webmin makes several system administration tasks easier, especially on a headless system. If you are not comfortable with commandline, I recommend installing and securing Webmin. You can create a cron job using Webmin interface to automatically run the CouchPotato auto update script at a set frequency. Go to System -> Scheduled Cron Jobs create a cron job as shown below.

CouchPotato Auto Update Cron
CouchPotato Auto Update Cron

In the example above, I am setting up the CouchPotato upgrade script to autorun at midnight. You could also do the same thing from commandline by creating a cron tab item, if you know what you are doing. Cron should email you the output of the command. If you find that annoying you may disable Cron email notifications.

That is all there is to it. Go ahead setup your CouchPotato auto update and get one step closer to completely automating your home server.

We Are Hiring: Familiar with Media Streaming, HTPC, Home Server, Smart Home, and Home Automation topics? Write about it and earn money. No writing experience needed. APPLY HERE.

Get 20% OFF with IPVanish VPN:

♦   Hide your browsing and streaming activity: No logs and no tracking
♦   Access geo-restricted content from anywhere
♦   Encrypt and anonymize: Kodi, Plex, Downloads, Personal Info
♦   Windows, Mac, Linux, Android, iOS, Router, and more.
♦   Money back guarantee - Sign Up Now

About the author

Anand

Anand is a self-learned computer enthusiast, a part-time blogger, and a Food Scientist by career. He has been blogging since 2010 on Linux, Ubuntu, Home/Media/File Servers, Smart Home Automation, and related HOW-TOs on htpcbeginner.com and smarthomebeginner.com.

Archives

Join the other 110,000 followers

Don’t Miss Out!