{"id":31074125,"url":"https://github.com/axelhahn/bash-topgrade-wrapper","last_synced_at":"2025-09-16T02:03:28.749Z","repository":{"id":313096730,"uuid":"1048666933","full_name":"axelhahn/bash-topgrade-wrapper","owner":"axelhahn","description":"Linux bash script for cronjob using notify-send to show a notification to the main desktop user when topgrade starts and ends.","archived":false,"fork":false,"pushed_at":"2025-09-03T21:01:24.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-03T23:12:14.377Z","etag":null,"topics":["bash","bash-script","linux","linux-shell-script","notify-send","topgrade"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/axelhahn.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-01T20:30:03.000Z","updated_at":"2025-09-03T21:01:27.000Z","dependencies_parsed_at":"2025-09-03T23:12:16.695Z","dependency_job_id":"e500f0ce-ff39-43ef-996c-fc1320a0e261","html_url":"https://github.com/axelhahn/bash-topgrade-wrapper","commit_stats":null,"previous_names":["axelhahn/bash-topgrade-wrapper"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/axelhahn/bash-topgrade-wrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axelhahn%2Fbash-topgrade-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axelhahn%2Fbash-topgrade-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axelhahn%2Fbash-topgrade-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axelhahn%2Fbash-topgrade-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/axelhahn","download_url":"https://codeload.github.com/axelhahn/bash-topgrade-wrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/axelhahn%2Fbash-topgrade-wrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275348511,"owners_count":25448626,"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","status":"online","status_checked_at":"2025-09-16T02:00:10.229Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bash","bash-script","linux","linux-shell-script","notify-send","topgrade"],"created_at":"2025-09-16T02:03:19.942Z","updated_at":"2025-09-16T02:03:28.735Z","avatar_url":"https://github.com/axelhahn.png","language":"Shell","readme":"# Topgrade wrapper\n\n**Linux bash script** for cronjob using **notify-send** to show a notification to the main desktop user when topgrade starts and ends.\n\n* The notification disappears after a few seconds if everything is OK or \n* stays until you click on the error message. \n\nSo you stay informed if something goes wrong.\n\n👤 Author: Axel Hahn \\\n📄 Source: \u003chttps://github.com/axelhahn/bash-topgrade-wrapper\u003e \\\n📜 License: GNU GPL 3.0\n\n**Related links**:\n\n* [Topgrade](https://github.com/topgrade-rs/topgrade)\n\n## 👉🏼 Requirements\n\n* Linux\n* topgrade\n* sudo permission for your desktop user (for topgrade)\n* notify-send (topgrade will start if it is not installed - but then you won't need this wrapper)\n\n## 🖥️ Installation\n\nExtract a downloaded archive in `/opt/` or better use `git clone`.\n\nAs root:\n\n```txt\ncd /opt\ngit clone https://github.com/axelhahn/bash-topgrade-wrapper topgrade-wrapper\n```\n\nNo configuration is needed.\n\n## 💡 Usage\n\n### ⌨️ Interactive test\n\nFor a first test in a terminal start the script with **your user**.\n\n```txt\n/opt/topgrade-wrapper/start_topgrade.sh\n\n── 22:04:37 - System update ────────────────────────────────────────────────────\nWarning: Building packages as dynamic user\nWarning: Setting build directory to /var/cache/pamac\nPreparing...\nSynchronizing package databases...                                            \n(...)\n```\n\nYou should see a disappearing notification box as well:\n\n![Notification of start of os update](screenshot_start.png)\n\nIf the script ends you get a notification again. \n\n* It is a disappearing notification on success or \n* an error message on failure that stays on the screen until clicking on it.\n\n### 🕓 Cronjob\n\nCreate a cronjob eg. as file in `/etc/cron.d/`.\n\nIn your cronjob\n\n* Execute the wrapper script as user that has sudo permissions\n* Redirect the output\n\n**Example**:\n\n```txt\n50 8,12,16,20 * * * axel /opt/topgrade-wrapper/start_topgrade.sh \u003e/tmp/topgrade.log 2\u003e\u00261\n```\n\nOR\n\nWhen starting the job as root\n\n* Add a variable `SUDO_USER=\u003cyour-user\u003e` to set a target user for notification\n\n```txt\nSUDO_USER=axel\n50 8,12,16,20 * * * root /opt/topgrade-wrapper/start_topgrade.sh \u003e/tmp/topgrade.log 2\u003e\u00261\n```\n\nI prefer my **Cronwrapper** to simplify monitoring all cronjobs\n\n📗 Docs: see https://www.axel-hahn.de/docs/cronwrapper/ \n\nThen it can look like this:\n\n```txt\n50 8,12,16,20 * * * axel /opt/cronwrapper.sh 1440 \"/opt/topgrade-wrapper/start_topgrade.sh\" 'os-update'\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxelhahn%2Fbash-topgrade-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faxelhahn%2Fbash-topgrade-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faxelhahn%2Fbash-topgrade-wrapper/lists"}