Giter Site home page Giter Site logo

tongjial / fakeupsshutdown Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ivanhao/fakeupsshutdown

0.0 0.0 0.0 37 KB

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

License: GNU General Public License v3.0

Shell 100.00%

fakeupsshutdown's Introduction

fakeUpsShutdown

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

一、工具准备

链接:https://github.com/ivanhao/fakeupsshutdown

二、安装

方式一:命令行安装

需要用root账号来运行

在终端中按行分别执行以下内容:

export LC_ALL=C.UTF-8
apt update && apt -y install git && git clone https://github.com/ivanhao/fakeupsshutdown.git
cd fakeupsshutdown
chmod +x config
./config
方式二:下载zip安装

download

  • 建议使用方式一来安装,不建议直接下载单sh脚本使用,因为那样更新的功能会无法使用!

  • 如果网络无法使用,或命令行使用有困难,可以使用方式二下载zip包拷入系统中使用。 然后执行以下命令进行安装配置:

chmod +x config
./config

main

选择install,输入1回车,进行安装。

脚本中需要设置三项:

IP: ip地址

min: 轮循的时间(分)

count: 允许ping不通几次

自动将脚本加入crontab, @reboot的方式,重启后会自动运行。

steps

三、注意事项

如果将轮询的时间设置过短,会导致ping不通路由的时候开机后马上自动关机,造成不必要的麻烦,请不要将轮询时间设置过短。

如果好用请去github页面点星点赞,

qq交流群: 878510703

qq

如果觉得好的请捐赠一下^_^

alipay

fakeupsshutdown's People

Contributors

ivanhao avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.