#!/bin/sh
# de
##########################################################################################################
# testen ob update-flashplugin-nonfree verfügbar/ausführbar ist
# updater ausführen;
# anschließend den status überprüfen und die entsprechenden zeilen mit grep ausfiltern
# Versionsnummer der installierten und entfernt verfügbare Version einlesen und vergleichen
# Wenn gleich nichts tun, wenn verschieden dann Mail an root.
# (Sinnvollerweise wäre konfiguriert dass root Mails generell an einen echten User weitergeleitet werden)
##########################################################################################################
# en
##########################################################################################################
# test whether update-flashplugin-nonfree is available / executable
# execute updater
# test installation status and grep installed and newest available version
# read installed and remotly available version. If equal do nothing, if different send mail to root
# (you should have configured to forward mails to root to a real user)
##########################################################################################################
test -x /usr/sbin/update-flashplugin-nonfree \
&& /usr/sbin/update-flashplugin-nonfree --install --quiet \
&& update-flashplugin-nonfree --status | grep -o ": [[:digit:]]*.[[:digit:]]*.[[:digit:]]*.[[:digit:]]*"\
| {
read installed
read available
if [ "x$installed" = "x$available" ] ; then
:
else
mail -s "flashupdate fehlgeschlagen / failed" root <<EOM
Hallo Admin,
Das flashupdate ist fehlgeschlagen.
Mit freundlichem Gruss
updatescript
Hello admin,
updating flash failed
Bye
updatescript
EOM
fi
}
#!/bin/sh
# de
##########################################################################################################
# testen ob update-flashplugin-nonfree verfügbar/ausführbar ist
# updater ausführen;
# anschließend den status überprüfen und die entsprechenden zeilen mit grep ausfiltern
# Versionsnummer der installierten und entfernt verfügbare Version einlesen und vergleichen
# Wenn gleich nichts tun, wenn verschieden dann Mail an root.
# (Sinnvollerweise wäre konfiguriert dass root Mails generell an einen echten User weitergeleitet werden)
##########################################################################################################
# en
##########################################################################################################
# test whether update-flashplugin-nonfree is available / executable
# execute updater
# test installation status and grep installed and newest available version
# read installed and remotly available version. If equal do nothing, if different send mail to root
# (you should have configured to forward mails to root to a real user)
##########################################################################################################
test -x /usr/sbin/update-flashplugin-nonfree \
&& /usr/sbin/update-flashplugin-nonfree --install --quiet \
&& update-flashplugin-nonfree --status | grep -o ": [[:digit:]]*.[[:digit:]]*.[[:digit:]]*.[[:digit:]]*"\
| {
read installed
read available
if [ "x$installed" = "x$available" ] ; then
:
else
mail -s "flashupdate fehlgeschlagen / failed" root <<EOM
Hallo Admin,
Das flashupdate ist fehlgeschlagen.
Manuelles update siehe unten.
Mit freundlichem Gruss
updatescript
Hello admin,
updating flash failed
Howto update manually see below.
Bye
updatescript
#****************************************************************************************
#
# manuales update / manual update:
# Gehe zu / go to: http://get.adobe.com/de/flashplayer/
#
# dl tar file (32 or 64 bit in abhängikeit bon deinem system)
#
# dann / then:
#
## 32 bit
# tar -xf install_flash_player_11_linux.i386.tar.gz
# chown root:root libflashplayer.so
# chown -R root:root usr # no "/" in front of usr
# chown root:root readme.txt # you won't copy it, so I mention it just for completeness
# cp -r usr/* /usr
# cp libflashplayer.so /usr/lib/flashplugin-nonfree/
#
## 64 bit
# tar -xf install_flash_player_11_linux.x86_64.tar.gz
# chown root:root libflashplayer.so
# chown -R root:root usr # no "/" in front of usr
# chown root:root readme.txt # you won't copy it, so I mention it just for completeness
# cp -r usr/* /usr
# cp libflashplayer.so /usr/lib/flashplugin-nonfree/
#
#****************************************************************************************
EOM
fi
}
if [[ -x /usr/bin/curl ]] ; then
printf "downloading "; curl -sS https://www.adobe.com/products/flashplayer/distribution3.html | grep -o 'Flash.*(Linux)'
curl -So install_flash_player_11_linux.x86_64.tar.gz https://fpdownload.macromedia.com/get/flashplayer/current/licensing/linux/install_flash_player_11_linux.x86_64.tar.gz
elif [[ -x /usr/bin/wget ]] ; then
printf "downloading "; wget -qO- https://www.adobe.com/products/flashplayer/distribution3.html | grep -o 'Flash.*(Linux)'
wget -Nc https://fpdownload.macromedia.com/get/flashplayer/current/licensing/linux/install_flash_player_11_linux.x86_64.tar.gz
else
printf "Weder curl noch wget sind installiert: Kein Download.\n"
fi
kernel="$(uname -r)";
arch=${kernel##*-}
if [[ $arch == i386 ]] ; then
filename="i386"
elif [[ $arch == amd64 ]] ; then
filename="x86_64"
fi
"install_flash_player_11_linux.${filename}.tar.gz"
/etc/cron.daily# ./flash
./flash: 83: ./flash: Syntax error: end of file unexpected (expecting "fi")
cat /etc/cron.daily/flash
#!/bin/sh
# de
##########################################################################################################
# testen ob update-flashplugin-nonfree verfügbar/ausführbar ist
# updater ausführen;
# anschließend den status überprüfen und die entsprechenden zeilen mit grep ausfiltern
# Versionsnummer der installierten und entfernt verfügbare Version einlesen und vergleichen
# Wenn gleich nichts tun, wenn verschieden dann Mail an root.
# (Sinnvollerweise wäre konfiguriert dass root Mails generell an einen echten User weitergeleitet werden)
##########################################################################################################
# en
##########################################################################################################
# test whether update-flashplugin-nonfree is available / executable
# execute updater
# test installation status and grep installed and newest available version
# read installed and remotly available version. If equal do nothing, if different send mail to root
# (you should have configured to forward mails to root to a real user)
##########################################################################################################
test -x /usr/sbin/update-flashplugin-nonfree \
&& /usr/sbin/update-flashplugin-nonfree --install --quiet \
&& update-flashplugin-nonfree --status | grep -o ": [[:digit:]]*.[[:digit:]]*.[[:digit:]]*.[[:digit:]]*"\
| {
read installed
read available
if [ "x$installed" = "x$available" ] ; then
:
else
mail -s "flashupdate fehlgeschlagen / failed" root <<EOM
Hallo Admin,
Das flashupdate ist fehlgeschlagen.
Manuelles update siehe unten.
Mit freundlichem Gruss
updatescript
Hello admin,
updating flash failed
Howto update manually see below.
Bye
updatescript
#****************************************************************************************
#
# manuales update / manual update:
# Gehe zu / go to: http://get.adobe.com/de/flashplayer/
#
# dl tar file (32 or 64 bit in abhängikeit bon deinem system)
#
# dann / then:
#
## 32 bit
# tar -xf install_flash_player_11_linux.i386.tar.gz
# chown root:root libflashplayer.so
# chown -R root:root usr # no "/" in front of usr
# chown root:root readme.txt # you won't copy it, so I mention it just for completeness
# cp -r usr/* /usr
# cp libflashplayer.so /usr/lib/flashplugin-nonfree/
#
## 64 bit
# tar -xf install_flash_player_11_linux.x86_64.tar.gz
# chown root:root libflashplayer.so
# chown -R root:root usr # no "/" in front of usr
# chown root:root readme.txt # you won't copy it, so I mention it just for completeness
# cp -r usr/* /usr
# cp libflashplayer.so /usr/lib/flashplugin-nonfree/
#
#****************************************************************************************
EOM
fi
}
cat /etc/cron.daily/flash
#!/bin/sh
# de
##########################################################################################################
# testen ob update-flashplugin-nonfree verfügbar/ausführbar ist
# updater ausführen;
# anschließend den status überprüfen und die entsprechenden zeilen mit grep ausfiltern
# Versionsnummer der installierten und entfernt verfügbare Version einlesen und vergleichen
# Wenn gleich nichts tun, wenn verschieden dann Mail an root.
# (Sinnvollerweise wäre konfiguriert dass root Mails generell an einen echten User weitergeleitet werden)
##########################################################################################################
# en
##########################################################################################################
# test whether update-flashplugin-nonfree is available / executable
# execute updater
# test installation status and grep installed and newest available version
# read installed and remotly available version. If equal do nothing, if different send mail to root
# (you should have configured to forward mails to root to a real user)
##########################################################################################################
test -x /usr/sbin/update-flashplugin-nonfree \
&& /usr/sbin/update-flashplugin-nonfree --install --quiet \
&& update-flashplugin-nonfree --status | grep -o ": [[:digit:]]*.[[:digit:]]*.[[:digit:]]*.[[:digit:]]*"\
| {
read installed
read available
if [ "x$installed" = "x$available" ] ; then
:
else
mail -s "flashupdate fehlgeschlagen / failed" root <<EOM
Hallo Admin,
Das flashupdate ist fehlgeschlagen.
Manuelles update siehe unten.
Mit freundlichem Gruss
updatescript
Hello admin,
updating flash failed
Howto update manually see below.
Bye
updatescript
#****************************************************************************************
#
# manuales update / manual update:
# Gehe zu / go to: http://get.adobe.com/de/flashplayer/
#
# dl tar file (32 or 64 bit in abhängikeit bon deinem system)
#
# dann / then:
#
## 32 bit
# tar -xf install_flash_player_11_linux.i386.tar.gz
# chown root:root libflashplayer.so
# chown -R root:root usr # no "/" in front of usr
# chown root:root readme.txt # you won't copy it, so I mention it just for completeness
# cp -r usr/* /usr
# cp libflashplayer.so /usr/lib/flashplugin-nonfree/
#
## 64 bit
# tar -xf install_flash_player_11_linux.x86_64.tar.gz
# chown root:root libflashplayer.so
# chown -R root:root usr # no "/" in front of usr
# chown root:root readme.txt # you won't copy it, so I mention it just for completeness
# cp -r usr/* /usr
# cp libflashplayer.so /usr/lib/flashplugin-nonfree/
#
#****************************************************************************************
EOM
fi
}