LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > jere21
User Name
Password

Notices


Rating: 2 votes, 4.00 average.

Automatically update flashplayer-plugin

Posted 07-11-2015 at 04:03 PM by jere21
Updated 07-20-2015 at 08:13 PM by jere21

Code:
ii  flashplugin-nonfree  1:3.6.1  amd64  Adobe Flash Player - browser plugin
Debian doesn't update the flashplayer-plugin automatically to avoid downloading an unchecked 3rd party proprietary binary. If you want to ignore that risk for convenience do the following:

/usr/local/bin/flash-update.sh
Code:
#!/bin/sh
update-flashplugin-nonfree --install

/etc/systemd/system/flash-update.service
Code:
[Unit]
Description=update-flashplugin-nonfree
Wants=network-online.target

[Service]
Type=simple
ExecStart=/usr/local/bin/flash-update.sh

[Install]
WantedBy=multi-user.target

/etc/systemd/system/flash-update.timer
Code:
[Unit]
Description=Run flash-update(.service) regularly

[Timer]
# Time to wait after booting before we run first time
OnBootSec=1min

# Time between running each consecutive time
OnUnitActiveSec=12h
Unit=flash-update.service

[Install]
WantedBy=flash-update.service

Enable (on boot) and start the timer (immediately):
Code:
sudo systemctl enable flash-update.service 
# Created symlink from /etc/systemd/system/multi-user.target.wants/flash-update.service to /etc/systemd/system/flash-update.service.
sudo systemctl enable flash-update.timer
# Created symlink from /etc/systemd/system/flash-update.service.wants/flash-update.timer to /etc/systemd/system/flash-update.timer.
sudo systemctl start flash-update.timer

Check if it is working:
Code:
sudo update-flashplugin-nonfree --status
sudo systemctl list-timers
In the output of the latter a line for the UNIT flash-update.timer should show the last passed and next run time.


Edit 2015-07-15: Need to also enable the service (not just the timer), for the timer to start automatically at boot.
Posted in Uncategorized
Views 1696 Comments 2
« Prev     Main     Next »
Total Comments 2

Comments

  1. Old Comment
    Thank you for posting this, jere21. One question: why not just use cron? I understand systemd might be nice for debugging complex situations, but for something as trivial as this, cron works just as well and is much simpler, no?

    This is especially easy on a Debian system where one can simply create a shell script in /etc/cron.daily/ and know that it'll be run once a day without needing to enable any craziness.

    Code:
    echo '/usr/sbin/update-flashplugin-nonfree --install' > update-flash
    chmod 755 update-flash
    sudo mv update-flash /etc/cron.daily/
    Cut and paste the above into a terminal, and flash will be updated every night around 3am.
    Posted 03-21-2016 at 11:43 AM by hackerb9 hackerb9 is offline
  2. Old Comment
    Quote:
    Originally Posted by hackerb9 View Comment
    One question: why not just use cron?
    Sure. I just wanted to play directly with systemd. Just because
    Posted 03-21-2016 at 12:06 PM by jere21 jere21 is offline
 

  



All times are GMT -5. The time now is 03:53 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration