Skip to main content

SvcD class and "svcd" command to run persistent service programmes.

Project description

This provides the features one wants from a daemon for arbitrary commands providing a service:

  • process id (pid) files for both svcd and the service command

  • filesystem visible status (command running, service enabled) via cs.app.flag

  • command restart if the command exits

  • command control (stop, restart, disable) via cs.app.flag

  • test function to monitor for service viability; if the test function fails, do not run the service. This typically monitors something like network routing (suspend service while laptop offline) or a ping (suspend ssh tunnel while target does not answer pings).

  • signature function to monitor for service restart; if the signature changes, restart the service. This typically monitors something like file contents (restart service on configuration change) or network routing (restart ssh tunnel on network change)

  • callbacks for service command start and end, for example to display desktop notifications

I use this to run persistent ssh port forwards and a small collection of other personal services. I have convenient shell commands to look up service status and to start/stop/restart services.

See cs.app.portfwd which I use to manage my ssh tunnels; it is a single Python programme running multiple ssh commands, each via its own SvcD instance.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cs.app.svcd-20171026.tar.gz (6.9 kB view details)

Uploaded Source

File details

Details for the file cs.app.svcd-20171026.tar.gz.

File metadata

File hashes

Hashes for cs.app.svcd-20171026.tar.gz
Algorithm Hash digest
SHA256 dcc71ad27c581ba64b79deb01938c9e9d260bad3c6e9c815ebaee76f2d0a7ade
MD5 f3103fe88ac84b3eb2b7fa3b97470a21
BLAKE2b-256 42def09a1fafb10d34b1c14ba27f10346d3a71ef8b71d39935be48ebbba295b7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page