This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
### BEGIN INIT INFO | |
# Provides: YOURAPP | |
# Required-Start: nginx | |
# Required-Stop: | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: The main gunicorn process for YOURAPP | |
# Description: The gunicorn process that receives HTTP requests | |
# from nginx and proxies them to YOURAPP. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# based on https://medium.com/@edwardbenson/how-i-hacked-amazon-s-5-wifi-button-to-track-baby-data-794214b0bdd8 | |
# | |
# This is a quick hack. As such, it: | |
# * lacks exception handling | |
# * has no pretense of object orientation | |
# * needs root privs (for network monitoring) but doesn't do anything | |
# to make that safe (e.g. drop privs, etc.) | |
# * gets configured manually (see below) |