       (System/exit 0))
     :else
     (start-app args)))
-  


(defn stop-app []
  (doseq [component (:stopped (mount/stop))]
    (log/info component "stopped"))
  (shutdown-agents))

(defn start-app [args]

                        (parse-opts cli-options)
                        mount/start-with-args
                        :started)]
    (log/info logger ::system.startup {:msg (str component " started")}))
  (.addShutdownHook (Runtime/getRuntime) (Thread. stop-app)))

(defn dev-restart
  ([] (dev-restart nil))
  ([& args]
   (log/info logger ::system.restart {:msg "Shutting down all services"})
   (doseq [component (:stopped (mount/stop))]
     (log/info logger ::system.restart {:msg (str component " stopped")}))
   (log/info logger ::system.restart {:msg "Restarting.."})
   (start-app args)))

(defn -main [& args]
