Browse Source

shepherd: add ratspub

master
Efraim Flashner 1 year ago
committed by Shepherd
parent
commit
fea8ff6ba6
2 changed files with 21 additions and 0 deletions
  1. +3
    -0
      run_ratspub.sh
  2. +18
    -0
      shepherd/init.d/ratspub.scm

+ 3
- 0
run_ratspub.sh View File

@@ -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

+ 18
- 0
shepherd/init.d/ratspub.scm View File

@@ -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)

Loading…
Cancel
Save