Skip to content

snltd/gurp

Repository files navigation

Rust Tests Janet Tests illumos Build

Gurp

Gurp is an illumos configuration management tool.

Hosts are described in a thin Janet DSL.

(use ../globals)

(def smf-method-path (pathcat site-smf-method "minidlna.sh"))
(def smf-service "sysdef/multimedia/minidlna")

(def minidlna-conf
  [:media_dir "A,/storage/flac"
   :friendly_name (hostname)
   :album_art_names "front.jpg"
   :strict_dlna "no"
   :notify_interval 900])

(host "minidlna-server"
      (pkg/ensure "ooce/multimedia/minidlna")

      (file/ensure smf-method-path
                   :mode "0755"
                   :from "minidlna/minidlna-method.sh")

      (file/ensure "/etc/opt/ooce/minidlna/minidlna.conf"
                   :from-struct minidlna-conf
                   :to-format "k=v")

      (svc/ensure smf-service :state "online")

      (smf/ensure smf-service
                  :fmri smf-service
                  :description "MiniDLNA - DLNA/UPnP-AV media server"
                  (smf-method "start"
                              :exec smf-method-path
                              :user "minidlna"
                              :group "minidlna")
                  (smf-method "refresh"
                              :exec smf-method-path
                              :user "minidlna"
                              :group "minidlna")))

If you want to know more:

Get Gurp

About

illumos config management via Rust and Janet

Resources

License

Stars

Watchers

Forks

Packages

No packages published