diff options
author | Efraim Flashner | 2020-03-02 11:03:46 +0000 |
---|---|---|
committer | Shepherd | 2020-03-02 11:03:46 +0000 |
commit | fea8ff6ba673decf3fd1e722495cb5f1e4bb92f1 (patch) | |
tree | dfb2fb8e1557375862e70c77db7e10694dd68cf8 | |
parent | ad3af2f65d15e29c76086ba8c8fff15248603fa2 (diff) | |
download | gn-shepherd-services-fea8ff6ba673decf3fd1e722495cb5f1e4bb92f1.tar.gz |
shepherd: add ratspub
-rwxr-xr-x | run_ratspub.sh | 3 | ||||
-rw-r--r-- | shepherd/init.d/ratspub.scm | 18 |
2 files changed, 21 insertions, 0 deletions
diff --git a/run_ratspub.sh b/run_ratspub.sh new file mode 100755 index 0000000..d10c1d6 --- /dev/null +++ b/run_ratspub.sh @@ -0,0 +1,3 @@ +#!/bin/sh +cd $(/var/guix/profiles/per-user/shepherd/current-guix/bin/guix build ratspub) +/var/guix/profiles/per-user/shepherd/current-guix/bin/guix environment --ad-hoc ratspub -- ./server.py diff --git a/shepherd/init.d/ratspub.scm b/shepherd/init.d/ratspub.scm new file mode 100644 index 0000000..13d20eb --- /dev/null +++ b/shepherd/init.d/ratspub.scm @@ -0,0 +1,18 @@ +(define ratspub + (make <service> + #:provides '(ratspub) + #:docstring "Run the rats.pub web server" + #:start (make-forkexec-constructor + ;(system* "/var/guix/profiles/per-user/shepherd/current-guix/bin/guix" "environment" "--ad-hoc" "ratspub" "--" "./server.py") + '("/home/shepherd/run_ratspub.sh") + ;#:directory (system* "/var/guix/profiles/per-user/shepherd/current-guix/bin/guix" "build" "ratspub") ; returns 0 + #:environment-variables + (list "EDIRECT_PUBMED_MASTER=/export2/PubMed" + "NLTK_DATA=/export2/PubMed/nltk_data" + "PERL_LWP_SSL_CA_FILE=/etc/ssl/certs/ca-certificates.crt") + #:log-file "/home/shepherd/logs/ratspub.log") + #:stop (make-kill-destructor) + #:respawn? #t)) +(register-services ratspub) + +;(start ratspub) |