Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diversen/ubuntu-auto-upgrade
Script to auto update a ubuntu server and sending notification emails using SMTP
https://github.com/diversen/ubuntu-auto-upgrade
ubuntu-auto-upgrade ubuntu-automation ubuntu-php ubuntu-upgrades
Last synced: 23 days ago
JSON representation
Script to auto update a ubuntu server and sending notification emails using SMTP
- Host: GitHub
- URL: https://github.com/diversen/ubuntu-auto-upgrade
- Owner: diversen
- Created: 2022-07-14T10:41:31.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-20T14:50:40.000Z (over 1 year ago)
- Last Synced: 2024-04-14T22:22:41.149Z (9 months ago)
- Topics: ubuntu-auto-upgrade, ubuntu-automation, ubuntu-php, ubuntu-upgrades
- Language: PHP
- Homepage:
- Size: 56.6 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ubuntu Auto Upgrade
This script will auto-upgrade ubuntu and send email notifications using SMTP.
It will probably also work with other Debian variants of linux.There is also a python port of these scripts:
[ubuntu-auto-upgrade-py](https://github.com/diversen/ubuntu-auto-upgrade-py.git)
Tested on Ubuntu 20.04 LTS and 22.04 LTS
## Install
git clone https://github.com/diversen/ubuntu-auto-upgrade.git
cd ubuntu-auto-upgrade
composer install## Config
Create config files:
cp -R config/* config-locale/
Edit SMTP settings in `config-locale/SMTP.php`.
`DefaultTo` setting in SMTP is the email address of the person who will receive emails.You can also edit `config-locale/App.php`. `restart` determines if the server should restart if needed.
You may also set `timezone`.## Cron
Set the script up as a cron script. Let it run every 10 minutes of so.
You will need to let the script run as root. Edit crontab as `sudo`, e.g.:sudo crontab -e
Add the crontab line (change to your own source path):
*/10 * * * * cd /home/dennis/ubuntu-auto-upgrade && php cron.php
## Logs
Logs are written to `logs/main.log`. This log file will be created if it does not exist.
# License
MIT © [Dennis Iversen](https://github.com/diversen)