Created
July 16, 2018 10:09
-
-
Save albal/047298598e49397db0c05682aafcfae5 to your computer and use it in GitHub Desktop.
Ubuntu compatible update scripts for Centos
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # /usr/lib/update-notifier/apt-check | |
| val=$(yum check-update --quiet | grep '^[a-Z0-9]' | wc -l) | |
| echo "${val};${val}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # /etc/cron.hourly/needs-reboot.sh | |
| # Install yum-utils : yum install yum-utils | |
| if needs-restarting -r ; then | |
| echo "Does not need restarting" | |
| rm /var/run/reboot-required | |
| else | |
| echo "Needs restarting" | |
| touch /var/run/reboot-required | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment