{"id":27888385,"url":"https://github.com/daniel-k/idle-shutdown","last_synced_at":"2025-06-22T01:38:00.242Z","repository":{"id":24645981,"uuid":"28055674","full_name":"daniel-k/idle-shutdown","owner":"daniel-k","description":"Automatically shutdown a machine when certain conditions are met.","archived":false,"fork":false,"pushed_at":"2014-12-15T20:52:25.000Z","size":104,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T09:08:10.605Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daniel-k.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}},"created_at":"2014-12-15T20:51:32.000Z","updated_at":"2021-11-10T12:08:02.000Z","dependencies_parsed_at":"2022-08-23T04:31:51.497Z","dependency_job_id":null,"html_url":"https://github.com/daniel-k/idle-shutdown","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel-k%2Fidle-shutdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel-k%2Fidle-shutdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel-k%2Fidle-shutdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daniel-k%2Fidle-shutdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daniel-k","download_url":"https://codeload.github.com/daniel-k/idle-shutdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252470752,"owners_count":21753047,"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":[],"created_at":"2025-05-05T09:08:13.283Z","updated_at":"2025-05-05T09:08:13.767Z","avatar_url":"https://github.com/daniel-k.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"idle-shutdown\n=============\n\nThis bunch of scripts serves to shutdown a machine when certain requirements \nare met. Customization can easily ba done by adding your own bash scripts.\n\nI created them with my NAS in mind to save electricity when my server is not\naccessed anymore, but as the action as well as the conditions are customizable\nit might be used for other tasks, too.\n\nThese scripts are tested on Ubuntu 14.04 and some may require additional\npackages, please refer to the descriptions inside every script.\n\n\n## Installation\n\n1. Copy the project folder to a place that only root has access to, `/root`\n   might be a good start.\n\n2. It's important that only root can alter files in that directory, otherwise\n   this creates a big security hole. So change permissions:\n   `$ chmod -R go-rwx /root/idle-shutdown`\n\n3. Setup a cronjob that executes [idle-shutdown](idle-shutdown) periodically.\n   Example:\n   `*/1 * * * * /root/idle-shutdown/idle-shutdown \u0026\u003e /dev/null`\n\n4. Have a look at the existing scripts in [conf.d](conf.d) as they already\n   provide some useful checks, but some need configuration.\n\n\n## How to extent\n\nThe scripts are organized inside the folder [conf.d](conf.d) and executed in\nlexicographical order. As soon as **every** script terminates successfully, i.e.\nreturn the exit code 0, the action specified in [idle-shutdown](idle-shutdown)\nwill be perfomed (shutdown by default).\n\nAll you need to do is to add your own scripts to that directory and make them\nexecutable, refer [to this example](conf.d/10_example).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel-k%2Fidle-shutdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaniel-k%2Fidle-shutdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaniel-k%2Fidle-shutdown/lists"}