aboutsummaryrefslogtreecommitdiff
path: root/gn/services
diff options
context:
space:
mode:
Diffstat (limited to 'gn/services')
-rw-r--r--gn/services/archive-pubmed.service13
-rw-r--r--gn/services/archive-pubmed.timer9
-rw-r--r--gn/services/bnw-container.scm4
3 files changed, 22 insertions, 4 deletions
diff --git a/gn/services/archive-pubmed.service b/gn/services/archive-pubmed.service
new file mode 100644
index 0000000..fd00b71
--- /dev/null
+++ b/gn/services/archive-pubmed.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=Download PubMed Archives
+After=network-online.target
+Wants=network-online.target
+AssertPathExists=/export2/PubMed
+
+[Service]
+ExecStart=/usr/local/guix-profiles/ratspub/bin/archive-pubmed
+Environment="EDIRECT_PUBMED_MASTER=/export2/PubMed" "PERL_LWP_SSL_CA_FILE=/etc/ssl/certs/ca-certificates.crt" "PATH=/usr/local/guix-profiles/ratspub/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/usr/sbin"
+User=hchen
+
+[Install]
+WantedBy=multi-user.target
diff --git a/gn/services/archive-pubmed.timer b/gn/services/archive-pubmed.timer
new file mode 100644
index 0000000..4bb27ba
--- /dev/null
+++ b/gn/services/archive-pubmed.timer
@@ -0,0 +1,9 @@
+[Unit]
+Description=Daily PubMed downloads
+
+[Timer]
+OnBootSec=5h
+OnUnitInactiveSec=15h
+
+[Install]
+WantedBy=default.target
diff --git a/gn/services/bnw-container.scm b/gn/services/bnw-container.scm
index 8463a75..39da38d 100644
--- a/gn/services/bnw-container.scm
+++ b/gn/services/bnw-container.scm
@@ -21,10 +21,6 @@
(match-lambda
(($ <bnw-configuration> package deploy-directory port)
#~(begin
- (use-modules (guix build utils))
- (when (directory-exists? #$deploy-directory)
- ;; Not 'delete-file-recursively' because the directory might be empty.
- (system* "rm" "-r" #$(string-append deploy-directory "/*")))
(mkdir-p #$deploy-directory)
(copy-recursively #$package #$deploy-directory)
(invoke #$(file-append coreutils "/bin/chmod") "a+w"