Skip to content
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.

Latest commit

 

History

History
19 lines (15 loc) · 1.03 KB

README.md

File metadata and controls

19 lines (15 loc) · 1.03 KB

pullcheck

Pull a repo, check for any changes, restart a separate process. Assumes target process is python but could run anything if you wanted. Arguably a bit of a bodge for environments where changes cannot be pushed, such as behind a VPN. Does not check that your changes are good, just whether they have happened.

Change variables in config.py for your setup. Configure git to use SSH that does not need a passcode. Set up the remote origin on your local git directory before you run.

Designed for Ubuntu Linux. pullcheck should be set to autorun on boot, not your target program.

Basic Structure

  1. run git pull on git_url
  2. if git_pull_change is True then stop target program
  3. Start target program
  4. loop every pull_wait seconds until the end of the universe or the server dies, whichever comes first

Demo

To get this up and running on your local machine as-is,

  1. git clone [email protected]:jamesgeddes/sandbox.git
  2. cd ..
  3. git clone [email protected]:jamesgeddes/pullcheck.git
  4. Edit config.git_local_path