Automatically update flashplayer-plugin
Tags debian jessie, flash, systemd
Code:
ii flashplugin-nonfree 1:3.6.1 amd64 Adobe Flash Player - browser plugin
/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
Edit 2015-07-15: Need to also enable the service (not just the timer), for the timer to start automatically at boot.
Total Comments 2
Comments
-
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/
Posted 03-21-2016 at 11:43 AM by hackerb9 -
Posted 03-21-2016 at 12:06 PM by jere21