You are not logged in.

#1 2016-07-24 19:51:06

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Update FlashPlayer plugins automatically with systemd

This guide presumes that either Adobe's FlashPlayer or Google's PepperFlashPlayer is already installed and working.

See https://wiki.debian.org/FlashPlayer, https://wiki.debian.org/PepperFlashPlayer & https://wiki.debian.org/Freshplayerplugin

Keeping Adobe's FlashPlayer plugin up to date is very important.

If systemd is used as PID1 (/sbin/init) then a timer can be used to fetch updates daily.

First, create an update script at /usr/local/bin/update-flashplugins (as root!) with the following content:

#!/bin/sh

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

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

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

This script was shamelessly stolen from @nobody:
http://crunchbang.org/forums/viewtopic.php?id=33319

Make the script executable with:

sudo chmod +x /usr/local/bin/update-flashplugins

Then create two custom unit files for systemd:

/etc/systemd/system/update-flashplugins.timer

[Unit]
Description=Update FlashPlayer plugins daily.

[Timer]
OnCalendar=daily
AccuracySec=1h
Persistent=true

[Install]
WantedBy=timers.target

/etc/systemd/system/update-flashplugins.service

[Unit]
Description=Update FlashPlayer plugins.

[Service]
Type=oneshot
ExecStart=/usr/local/bin/update-flashplugins

Finally, enable the timer with:

sudo systemctl enable update-flashplugins.timer

DIsable the timer with:

sudo systemctl disable update-flashplugins.timer

Check the status with:

systemctl status update-flashplugins.timer

Which should look something like this:

empty@TheLab:~$ sudo systemctl status update-flashplugins.timer
● update-flashplugins.timer - Update FlashPlayer plugins daily.
   Loaded: loaded (/etc/systemd/system/update-flashplugins.timer; enabled)
   Active: inactive (dead)

smile

Offline

#2 2016-07-24 20:21:05

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,138
Website

Re: Update FlashPlayer plugins automatically with systemd

Great!

Since pepperflashplugin-nonfree is 64 bit only, is this correct for flashplugin-nonfree only for Firefox?

#!/bin/sh

NAAPI_FLASH="update-flashplugin-nonfree"

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

I don't care what you do at home. Would you care to explain?

Offline

#3 2016-07-24 20:22:42

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Update FlashPlayer plugins automatically with systemd

hhh wrote:

Since pepperflashplugin-nonfree is 64 bit only, would you post a flashplugin-nonfree only version for Firefox?

The posted guide works for both Adobe's FlashPlayer and Google's PepperFlashPlayer smile

Offline

#4 2016-07-24 20:23:40

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,138
Website

Re: Update FlashPlayer plugins automatically with systemd

I edited my post. I see, so no harm for checking for a plugin that doesn't exist, nice!


I don't care what you do at home. Would you care to explain?

Offline

#5 2016-07-24 20:51:16

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: Update FlashPlayer plugins automatically with systemd

NAAPI_FLASH="update-flashplugin-nonfree" 

Shouldn't the variable technically be NPAPI   ? Not that it matters, but just my ocd kicking in!  tongue


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#6 2016-07-24 20:52:54

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: Update FlashPlayer plugins automatically with systemd

Horizon_Brave wrote:

NAAPI_FLASH="update-flashplugin-nonfree" 

Shouldn't the variable technically be NPAPI   ?

Erm, I dunno...

I wrote:

This script was shamelessly stolen from @nobody

big_smile

EDIT: I'm guessing it may be a typo, OP changed.

Last edited by Head_on_a_Stick (2016-07-24 20:54:21)

Offline

#7 2016-07-24 21:29:15

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: Update FlashPlayer plugins automatically with systemd

hehe, when I can't offer technical help, I fall back to spelling and grammar.   tongue


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

Board footer

Powered by FluxBB