SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2014-03-18 06:11:42

twoion
Emerald Caffeine
From: 星界
Registered: 2012-05-11
Posts: 1,648

[HowTo] Keep proprietary flash plugins up-to-date using cron

The packages

flashplugin-nonfree
pepperflashplugin-nonfree

provide the latest available flash players in the NAAPI and PEPPER versions. However, these packages only provide a manual update mechanism and don't update automatically when "apt-get dist-upgrade"'ing. Here's how to automate updating them using cron.

Create a file

/etc/cron.daily/update-flashplugins

with the following contents:

#!/bin/sh

NAAPI_FLASH="update-flashplugin-nonfree"
PEPPER_FLASH="update-pepperflashplugin-nonfree"

if type "$NAAPI_FLASH" 1>/dev/null ; then
  "$NAAPI_FLASH" --install --quiet
fi

if type "$PEPPER_FLASH" 1>/dev/null ; then
  "$PEPPER_FLASH" --install --quiet
fi

and the appropriate ownership and file mode:

sudo chown root:root /etc/cron.daily/update-flashplugins
sudo chmod 755 /etc/cron.daily/update-flashplugins

Cron will now daily run this script and update the plugins to their latest available versions.

(Edit: Incorporate some of Alad's suggestions)

Last edited by twoion (2014-03-18 15:58:32)

Offline

Be excellent to each other!

#2 2014-03-18 14:55:54

Alad
Software Satan
Registered: 2014-02-20
Posts: 1,512

Re: [HowTo] Keep proprietary flash plugins up-to-date using cron

#!/bin/sh
test -x /usr/sbin/update-pepperflashplugin-nonfree \
&& update-pepperflashplugin-nonfree --status \
   | grep -o ": [[:digit:]]*.[[:digit:]]*.[[:digit:]]*.[[:digit:]]*" \
   | {
read installed
read available

if [ "$installed" \< "$available" ] ; then
   /usr/sbin/update-pepperflashplugin-nonfree --install --quiet \
   && echo "$(date) Updating pepperflash successful" >> /var/log/pepperupdate.log
   || echo "$(date) Updating pepperflash failed" >> /var/log/pepperupdate.log
fi
}

Last edited by Alad (2014-03-18 14:57:51)

Offline

#3 2014-03-18 15:54:59

twoion
Emerald Caffeine
From: 星界
Registered: 2012-05-11
Posts: 1,648

Re: [HowTo] Keep proprietary flash plugins up-to-date using cron

#!/bin/sh
test -x /usr/sbin/update-pepperflashplugin-nonfree \
&& update-pepperflashplugin-nonfree --status \
   | grep -o ": [[:digit:]]*.[[:digit:]]*.[[:digit:]]*.[[:digit:]]*" \
   | {
read installed
read available

if [ "$installed" \< "$available" ] ; then
   /usr/sbin/update-pepperflashplugin-nonfree --install --quiet \
   && echo "$(date) Updating pepperflash successful" >> /var/log/pepperupdate.log
   || echo "$(date) Updating pepperflash failed" >> /var/log/pepperupdate.log
fi
}

Offline

#4 2014-03-18 16:09:00

Alad
Software Satan
Registered: 2014-02-20
Posts: 1,512

Re: [HowTo] Keep proprietary flash plugins up-to-date using cron

When I tried it with pepperflash it always downloaded the installer, but I used the version 1.2 from bpo. Good to know that 1.3 fixes this.  smile

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.
Server: bleh

Debian Logo