Paste number 349842: Shepherd user service

Paste number 349842: Shepherd user service
Pasted by: jlicht
When:5 years, 2 months ago
Share:Tweet this! | http://paste.lisp.org/+7HXU
Channel:None
Paste contents:
Raw Source | XML | Display As
;; -*- geiser-scheme-implementation: guile -*-
(use-modules (shepherd service)
             (oop goops))

(define %log-dir "/home/jelle/.config/shepherd/")

(define* (start-with-log command . args)
  (make-forkexec-constructor
   `(,command ,@args)
   #:log-file (string-append %log-dir command ".log")))

(define redshift
  (make <service>
    #:docstring "Redshift daemon"
    #:provides '(redshift)
    #:start (start-with-log "redshift" "-l" "52:4")
    #:stop (make-kill-destructor)))

(define mcron
  (make <service>
    #:docstring "mcron daemon"
    #:provides '(mcron)
    #:start (start-with-log "mcron")
    #:stop (make-kill-destructor)))

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.