Code Monkey home page Code Monkey logo

serverautoconnect's Introduction

ServerAutoConnect

解决非固定IP下,服务器的自动联网以及DNS更新的方案。目前实现了在ip发生变动时,通过邮件来通知变动信息。

Before you start

补充auth/config/account.yamlip_update/config/emails.yaml中的设置信息

使用cron来周期性调度脚本的方法

首先让run.py文件转变为可执行

chmod -x /path/to/run.py

随后编辑cron设置

crontab -e

在文件末尾加上

*/5 * * * * /usr/bin/python /path/to/run.py

(注意,如果你使用了virtualenv,那么上面的/usr/bin/python应当使用虚拟环境中的python)

通过下面的命令来更新cron

sudo service cron reload

cron的日志文件位于/var/log/syslog中,你可以通过下面的命令筛选出相cron相关的条目

bash sudo grep CRON /var/log/syslog

serverautoconnect's People

Contributors

huangy10 avatar

Watchers

James Cloos avatar  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.