Jump to content
View in the app

A better way to browse. Learn more.

Pulseway

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Built-in Script Raspberry Pi Rasperrian [ Check and Install Updates ]

Featured Replies

Posted

Hey,

 

I noticed by deafult the build-in script don't support update check for Rasperrian I have updated the script simply create new script for linux call it update or how you want it.

 

#!/bin/bash

detect_os() {
  grep -qis "$*" /etc/issue || grep -qis "$*" /etc/centos-release
}

do_update() {
  echo "Detecting OS ... "

  detect_os "Raspbian GNU/Linux" && echo "Found Raspbian" && dpkg_update && return
  detect_os "Debian GNU/Linux" && echo "Found Debian" && dpkg_update && return
  detect_os "Ubuntu" && echo "Found Ubuntu" && dpkg_update && return
  detect_os "CentOS" && echo "Found CenOS" && yum_update && return
  detect_os "Red Hat" && echo "Found RedHat" && yum_update && return
  detect_os "Fedora" && echo "Found Fedora" && yum_update && return
  detect_os "SUSE" && echo "Found SuSE" && zypper_update && return
}

dpkg_update() {
 if [ -x "/usr/bin/apt-get" ];
 then
   echo "Starting update ..."
   apt-get clean && apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
 else
   echo "'apt-get' package manager not found"
 fi
}

yum_update() {
 if [ -x "/usr/bin/yum" ];
 then
   echo "Starting update ..."
   yum update -y && yum upgrade -y
 else
   echo "'yum' package manager not found"
 fi
}

zypper_update() {
 if [ -x "/usr/bin/zypper" ];
 then
   echo "Starting update ..."
   zypper --non-interactive update
 else
   echo "'zypper' package manager not found"
 fi
}

do_update

 

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.