Provide scripts for installing and running txircd standalone

Since Ashton asked about this, I wrote a few scripts to make running txircd standalone a bit more convenient. It handles setting up the virtualenv and provides an easy way to start and stop the deamon. It assumes python2-virtualenv, as well as the requirements for the dependencies txircd uses (these being a C compiler for Twisted, python2-dev, libssl-dev and libyaml-dev), are already installed on the system.
you want `[ -f $pidfile ] && ps `cat $pidfile` >/dev/null 2>&1`
that's not foolproof (few things are - that's why real service managers
like systemd and upstart exist) but it's on par with most init scripts.

On 27 October 2014 03:54, Stefan <notifications@github.com> wrote:

> In txircd.standalone:
>
> > @@ -0,0 +1,24 @@
> > +#!/bin/bash
> > +
> > +case "$1" in
> > +    "start")
> > +        if [ -d "env" ];
> > +        then
> > +            echo "Starting txircd..."
> > +            env/bin/twistd txircd
> > +            echo "txircd is running (pid "$(cat twistd.pid)")"
> > +        else
> > +            echo "No virtualenv found - Please run install.standalone first"
> > +        fi
> > +        ;;
> > +    "stop")
> > +        if [ ! -f "twistd.pid" ];
>
> Under normal circumstances it would be. Not sure how to deal with it being
> killed without the PID file being removed though. I need someone with more
> bash scripting knowledge.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ElementalAlchemist/txircd/pull/93/files#r19382093>.
>