Merge branch 'master' of github.com:cactorium/threefortiethofonehamster.com

This commit is contained in:
Kelvin Ly 2019-07-18 23:19:53 -04:00
commit c27f24648c
2 changed files with 3 additions and 2 deletions

View File

@ -13,6 +13,7 @@ import (
"net/http" "net/http"
"os" "os"
"os/exec" "os/exec"
"path"
"strconv" "strconv"
"strings" "strings"
"syscall" "syscall"
@ -172,7 +173,7 @@ func main() {
daemon.AddCommand(daemon.StringFlag(signal, "stop"), syscall.SIGTERM, termHandler) daemon.AddCommand(daemon.StringFlag(signal, "stop"), syscall.SIGTERM, termHandler)
daemon.AddCommand(daemon.StringFlag(signal, "reload"), syscall.SIGHUP, reloadHandler) daemon.AddCommand(daemon.StringFlag(signal, "reload"), syscall.SIGHUP, reloadHandler)
execName := os.Args[0] execName := path.Base(os.Args[0])
cntxt := &daemon.Context{ cntxt := &daemon.Context{
PidFileName: "/tmp/" + execName + "-pid", PidFileName: "/tmp/" + execName + "-pid",
PidFilePerm: 0644, PidFilePerm: 0644,

View File

@ -3,5 +3,5 @@
SCRIPT=`realpath $0` SCRIPT=`realpath $0`
SCRIPTPATH=`dirname $SCRIPT` SCRIPTPATH=`dirname $SCRIPT`
BASENAME=`basename $SCRIPTPATH` BASENAME=`basename $SCRIPTPATH`
echo $BASENAME echo "killing $BASENAME"
kill `cat /tmp/$BASENAME-pid` kill `cat /tmp/$BASENAME-pid`