Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Update FlashPlayer plugins automatically with systemd

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Update FlashPlayer plugins automatically with systemd

#1 Post by Head_on_a_Stick »

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:

Code: Select all

#!/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 @twoion over at the old #! forums:
http://crunchbang.org/forums/viewtopic.php?id=33319

Make the script executable with:

Code: Select all

sudo chmod +x /usr/local/bin/update-flashplugins
Then create two custom unit files for systemd:

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

Code: Select all

[Unit]
Description=Update FlashPlayer plugins daily.

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

[Install]
WantedBy=timers.target
/etc/systemd/system/update-flashplugins.service

Code: Select all

[Unit]
Description=Update FlashPlayer plugins.

[Service]
Type=oneshot
ExecStartPre=/bin/sleep 600
ExecStart=/usr/local/bin/update-flashplugins
Finally, enable the timer with:

Code: Select all

sudo systemctl enable update-flashplugins.timer
DIsable the timer with:

Code: Select all

sudo systemctl disable update-flashplugins.timer
Check the status with:

Code: Select all

systemctl status update-flashplugins.timer
Which should look something like this:

Code: Select all

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)
:)
deadbang

Post Reply