{"id":21027189,"url":"https://github.com/ivanhao/fakeupsshutdown","last_synced_at":"2025-04-12T12:23:25.770Z","repository":{"id":89341989,"uuid":"234281071","full_name":"ivanhao/fakeUpsShutdown","owner":"ivanhao","description":"It's fake ups shutdown script. Script check to ping router ip address,if router can not be connect,then shutdown system. Support debian9 debian10 ProxmoxVE 5 ProxmoxVE 6 Openmediavault 4 Openmediavault 5 这是一个伪装ups关机的脚本。脚本会ping你设置的路由器ip，如果不通会执行关机。支持debian9 debian10 ProxmoxVE 5 ProxmoxVE 6 Openmediavault 4 Openmediavault 5","archived":false,"fork":false,"pushed_at":"2020-08-17T15:41:37.000Z","size":37,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T07:04:36.129Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivanhao.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}},"created_at":"2020-01-16T09:18:00.000Z","updated_at":"2024-02-12T06:40:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"cc61f3dd-52f7-4018-b9e4-97c8f9f1fe95","html_url":"https://github.com/ivanhao/fakeUpsShutdown","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/ivanhao%2FfakeUpsShutdown","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanhao%2FfakeUpsShutdown/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanhao%2FfakeUpsShutdown/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivanhao%2FfakeUpsShutdown/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivanhao","download_url":"https://codeload.github.com/ivanhao/fakeUpsShutdown/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565402,"owners_count":21125483,"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-11-19T11:48:42.749Z","updated_at":"2025-04-12T12:23:25.751Z","avatar_url":"https://github.com/ivanhao.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fakeUpsShutdown\n\n\u003e It's fake ups shutdown script. Script check to ping router ip address,if router can not be connect,then shutdown system. Support `debian9` `debian10` `ProxmoxVE 5` `ProxmoxVE 6` `Openmediavault 4` `Openmediavault 5`\n这是一个伪装ups关机的脚本。脚本会ping你设置的路由器ip，如果不通会执行关机。支持`debian9` `debian10` `ProxmoxVE 5` `ProxmoxVE 6` `Openmediavault 4` `Openmediavault 5`\n\n# 一、工具准备\n\n链接：https://github.com/ivanhao/fakeupsshutdown\n\n# 二、安装\n###### 方式一：命令行安装\n\n\u003e 需要用root账号来运行\n\n在终端中按行分别执行以下内容：\n\n```\nexport LC_ALL=C.UTF-8\napt update \u0026\u0026 apt -y install git \u0026\u0026 git clone https://github.com/ivanhao/fakeupsshutdown.git\ncd fakeupsshutdown\nchmod +x config\n./config\n```\n\n###### 方式二：下载zip安装\n\n![download](https://upload-images.jianshu.io/upload_images/4171480-d75f6a4b8d3e7173.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\n\n\n\n- 建议使用方式一来安装，不建议直接下载单sh脚本使用，因为那样更新的功能会无法使用！\n\n- 如果网络无法使用，或命令行使用有困难，可以使用方式二下载zip包拷入系统中使用。\n然后执行以下命令进行安装配置：\n```\nchmod +x config\n./config\n```\n\n![main](https://upload-images.jianshu.io/upload_images/4171480-50a64967b0ede749.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\n\n选择install，输入1回车，进行安装。\n\n脚本中需要设置三项：\n\nIP: ip地址\n\nmin: 轮循的时间（分）\n\ncount: 允许ping不通几次\n\n自动将脚本加入crontab, @reboot的方式，重启后会自动运行。\n\n![steps](https://upload-images.jianshu.io/upload_images/4171480-5670bc8026cb8359.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\n\n\n#### 三、注意事项\n\n如果将轮询的时间设置过短，会导致ping不通路由的时候开机后马上自动关机，造成不必要的麻烦，请不要将轮询时间设置过短。\n\n如果好用请去github页面点星点赞，\n\n# qq交流群: 878510703\n\n![qq](http://upload-images.jianshu.io/upload_images/4171480-e0204ead0fb41d5e.jpg)\n\n## 如果觉得好的请捐赠一下^_^\n\n![alipay](https://upload-images.jianshu.io/upload_images/4171480-04c3ebb5c11cfdf9.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanhao%2Ffakeupsshutdown","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivanhao%2Ffakeupsshutdown","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivanhao%2Ffakeupsshutdown/lists"}