{"id":17998243,"url":"https://github.com/primaryobjects/remotereboot","last_synced_at":"2025-04-04T06:25:28.774Z","repository":{"id":22056687,"uuid":"25385546","full_name":"primaryobjects/remotereboot","owner":"primaryobjects","description":"Reboot your Linux/Mac while away from home.","archived":false,"fork":false,"pushed_at":"2014-10-18T03:17:53.000Z","size":128,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T17:42:18.320Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","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/primaryobjects.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}},"created_at":"2014-10-18T03:02:33.000Z","updated_at":"2014-10-18T03:16:18.000Z","dependencies_parsed_at":"2022-08-20T18:40:39.628Z","dependency_job_id":null,"html_url":"https://github.com/primaryobjects/remotereboot","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/primaryobjects%2Fremotereboot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Fremotereboot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Fremotereboot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/primaryobjects%2Fremotereboot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/primaryobjects","download_url":"https://codeload.github.com/primaryobjects/remotereboot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247130902,"owners_count":20888674,"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":"2024-10-29T21:24:42.846Z","updated_at":"2025-04-04T06:25:28.750Z","avatar_url":"https://github.com/primaryobjects.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Remote Reboot\n=============\n### for Linux/Mac\n\nReboot your Linux/Mac while away from home.\n\nEver had the need to reboot your computer while away? Remote Reboot is a bash script that periodically checks a web page for a value of 0 or 1 to determine if it should reboot the local computer.\n\nWhen you want the computer to reboot, just upload a new web page with the contents: 1\nFor all other cases, upload a web page with the contents: 0\n\nRemote Reboot will read from any url you configure. So, feel free to get creative. You can use a hosted file on Dropbox, Github, Google Drive, your web site, etc.\n\nIn between checks of the web page, Remote Reboot goes to sleep. From Monday to Friday during business hours, it will check the web page every hour. Outside of business hours, it will check every 2 hours. On weekends, it will check every 8 hours. Customize these sleep intervals as you like.\n\nInstall\n---\n\n1. Download [remotereboot.sh](https://raw.githubusercontent.com/primaryobjects/remotereboot/master/remotereboot.sh) and place it in a folder, such as ~/Documents/remotereboot.\n\n2. Edit the file and fill in values for the following variables at the top:\n\n ```sh\n # User-defined variables.\n url=\"https://dl.dropboxusercontent.com/u/...YOUR_FILE_HERE...txt\"\n logglyUrl=\"\"\n ```\n\n3. Save the file and run it with:\n ```sh\n cd ~/Documents/remotereboot\n sudo bash remotereboot.sh \u0026\n ```\n\nThe script will sleep until the desired number of seconds has elapsed. It will then download the web page and check for a value of \"1\". If found, it will reboot the computer.\n\nIf a value is provided for logglyUrl, it will send an HTTP POST to log the action before rebooting.\n\nRunning at Startup\n---\n\nYou can automatically run the script at boot time by editing /etc/rc.local and adding an entry to run the script. It's a good idea to include logging of the output, so you know it's working. Don't forget the ampersand at the end of the command, as this allows it to run in its own thread, as a background service.\n\n1. Edit /etc/rc.local and add the following lines towards the top of the file:\n ```sh\n # Log rc.local to tmp/rc.local.log\n exec 2\u003e /tmp/rc.local.log      # send stderr from rc.local to a log file\n exec 1\u003e\u00262                      # send stdout to the same log file\n set -x\n \n bash \"/home/username/Documents/remotereboot/remotereboot.sh\" \u0026\n ```\n\nLicense\n----\n\nMIT\n\nAuthor\n----\nKory Becker\nhttp://www.primaryobjects.com/kory-becker\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimaryobjects%2Fremotereboot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprimaryobjects%2Fremotereboot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprimaryobjects%2Fremotereboot/lists"}