Add albatross-systemd package

This commit is contained in:
Reynir Björnsson 2020-11-26 09:53:32 +01:00
parent f7a3c4fdac
commit 549a70b2a5
3 changed files with 34 additions and 1 deletions

19
albatross-systemd.opam Normal file
View file

@ -0,0 +1,19 @@
opam-version: "2.0"
maintainer: "Hannes Mehnert <hannes@mehnert.org>"
authors: ["Hannes Mehnert <hannes@mehnert.org>" "Reynir Björnsson <reynir@reynir.dk>"]
homepage: "https://github.com/hannesm/albatross"
dev-repo: "git+https://github.com/hannesm/albatross.git"
bug-reports: "https://github.com/hannesm/albatross/issues"
license: "ISC"
available: os = "linux"
depends: [
"albatross" {= version}
"fmt"
"fpath"
]
build: [
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
]
synopsis: "Albatross - orchestrate and manage MirageOS unikernels with Solo5 (SystemD files)"

View file

@ -1,3 +1,16 @@
(executable
(name gen_socket)
(libraries albatross))
(install
(files albatross_console.service albatross_console.socket
albatross_daemon.service albatross_daemon.socket
albatross_log.service albatross_log.socket
albatross_stats.service albatross_stats.socket)
(section share)
(package albatross-systemd))
(rule
(targets albatross_console.socket albatross_daemon.socket
albatross_log.socket albatross_stats.socket)
(action (run ./gen_socket.exe)))

View file

@ -5,7 +5,8 @@ sudo mkdir -m 0700 -p /var/lib/albatross/block
sudo install -o "$ALBATROSS_USER" -- /dev/null /var/lib/albatross/albatross.log
sudo cp ../../_build/install/default/bin/* /usr/local/sbin/
sudo cp ./albatross_*.service ./albatross_*.socket /etc/systemd/system/
sudo cp ../../_build/install/default/share/albatross-systemd/albatross_*.service /etc/systemd/system/
sudo cp ../../_build/install/default/share/albatross-systemd/albatross_*.socket /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl stop albatross_console
sudo systemctl start albatross_console