{"id":22974281,"url":"https://github.com/diversen/ubuntu-auto-upgrade-py","last_synced_at":"2025-08-13T14:33:54.240Z","repository":{"id":196035463,"uuid":"694154922","full_name":"diversen/ubuntu-auto-upgrade-py","owner":"diversen","description":"Python script to auto upgrade ubuntu (and maybe debian systems)","archived":false,"fork":false,"pushed_at":"2024-11-13T13:39:32.000Z","size":41,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-13T14:34:09.298Z","etag":null,"topics":["ubuntu-auto","ubuntu-auto-upgrade","ubuntu-automation","ubuntu-upgrades"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diversen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-20T12:43:15.000Z","updated_at":"2024-11-13T13:39:36.000Z","dependencies_parsed_at":"2024-09-16T11:52:38.059Z","dependency_job_id":"825ca030-e253-4760-b942-626846acf19f","html_url":"https://github.com/diversen/ubuntu-auto-upgrade-py","commit_stats":null,"previous_names":["diversen/ubuntu-auto-upgrade-py"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fubuntu-auto-upgrade-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fubuntu-auto-upgrade-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fubuntu-auto-upgrade-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diversen%2Fubuntu-auto-upgrade-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diversen","download_url":"https://codeload.github.com/diversen/ubuntu-auto-upgrade-py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229767225,"owners_count":18121043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ubuntu-auto","ubuntu-auto-upgrade","ubuntu-automation","ubuntu-upgrades"],"created_at":"2024-12-15T00:00:31.271Z","updated_at":"2024-12-15T00:01:16.578Z","avatar_url":"https://github.com/diversen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ubuntu Auto Upgrade\n\nThese python scripts upgrades your ubuntu server and they may also restart your server (if preferred).\n\nThe scripts are tested on Ubuntu 20.04 LTS and 22.04 LTS. The scripts will probably also work with other Debian variants of linux. \n\nThe scripts may also send notifications via SMTP, slack, mattermost, or using a custom function.\n\n## Install\n\n    git clone https://github.com/diversen/ubuntu-auto-upgrade-py.git\n    cd ubuntu-auto-upgrade-py\n    virtualenv venv\n    source venv/bin/activate\n    pip install -r requirements.txt\n\nUsing slack notifications:\n\n    pip install slack_sdk\n\nUsing mattermost notifications:\n\n    pip install requests\n\n## Config\n\nCreate config file:\n\n    cp config_dist.py config.py\n\nYou may edit `restart` which determines if the server should restart when needed. Default is to restart.\n\nYou may also alter the `send_message` function. This function is called when the server is upgraded or\nif the server is restarted (or if it needs to be restarted).\n\nYou may remove or alter the `send_message` function if you do not want to send any messages.\nOr send a message in a different way. \n\n## Cron\n\nSet the script up as a cron script. E.g. let it run every 10 minute or once a week.\nYou will need to let the script run as root. Edit crontab as `sudo`: \n\n    sudo crontab -e\n\nAdd a crontab line and remember to change to your own source path. \n\nThe following will run the script past midnight at 02.  \nThe script will also run when the server is rebooted:\n\n    0 2 * * * cd /home/dennis/ubuntu-auto-upgrade-py \u0026\u0026 ./venv/bin/python cron.py\n    @reboot cd /home/dennis/ubuntu-auto-upgrade-py \u0026\u0026 ./venv/bin/python cron.py\n\n## Logs\n\nLogs are written to `logs/main.log`. The log file will be created if it does not exist.  \n\n# License\n\nMIT © [Dennis Iversen](https://github.com/diversen)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiversen%2Fubuntu-auto-upgrade-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiversen%2Fubuntu-auto-upgrade-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiversen%2Fubuntu-auto-upgrade-py/lists"}