Commit b657f771 authored by Dave Cooper's avatar Dave Cooper
Browse files

add standard services init file loading hook

parent 863e5b95
Loading
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -40,6 +40,22 @@

    (format t "Gendl Container Startup is Complete.~%")

    ;; Load optional per-deployment initialization.
    ;; This file runs AFTER HTTP, SWANK, and lisply are all up.
    ;; Set GDL_SERVICES_INIT env var to the path, or it defaults
    ;; to ~/gdl-services-init.cl
    (let ((init-file (or (uiop:getenv "GDL_SERVICES_INIT")
                         (namestring
                          (merge-pathnames "gdl-services-init.cl"
                                           (user-homedir-pathname))))))
      (when (and init-file
                         (probe-file init-file)
                         (not (glisp:file-directory-p init-file)))
        (format t "Loading services init: ~a~%" init-file)
        (handler-case (load init-file)
          (error (c)
            (format t "ERROR in ~a: ~a~%" init-file c)))))
    
    (values)
    
    ))