Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
""" | |
Graceful Stopper | |
=================== | |
Tool to stop a TCPServer (or HTTPServer) in a graceful manner (when the all | |
currently running work is done). This script works either for forked servers or | |
single-process servers. | |
The graceful-stop process can be triggered by sending `SIGHUP` to server (in a | |
forked environment, sending SIGHUP to master server, propagates to all | |
children). Server immediately releases the listening socket (so another server |
--- | |
version: 1 | |
disable_existing_loggers: False | |
formatters: | |
simple: | |
format: "%(name)-20s%(levelname)-8s%(message)s" | |
handlers: | |
console: | |
class: logging.StreamHandler | |
level: DEBUG |
class _Singleton(type): | |
"""Singleton class from Stack Overflow: | |
http://stackoverflow.com/a/6798042 | |
""" | |
_instances = {} | |
def __call__(cls, *args, **kwargs): | |
if cls not in cls._instances: | |
cls._instances[cls] = super(_Singleton, cls).__call__(*args, **kwargs) |
from selenium import webdriver | |
from selenium.webdriver.support.wait import WebDriverWait | |
class WaitBrowser(object): | |
def __init__(self, **kw): | |
self.browser = webdriver.PhantomJS() | |
def readystate_complete(self): |
To build the extension, update the username/password and zip `background.js` and `manifest.json` in a single archive. | |
As of January 2018, Raspbian does not yet include the latest Python release, Python 3.8. This means we will have to build it ourselves, and here is how to do it. There is also an ansible role attached that automates it all for you.