diff of db342e0c8ab0d7fa45ade92c7448dc59a6fbca04

db342e0c8ab0d7fa45ade92c7448dc59a6fbca04
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..1491526
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+SHELL=/bin/bash
+SRC_FILES := $(shell find . -name \*.lisp)
+
+murja: $(SRC_FILES)
+	./bin/build.sh
+
+/opt/murja/murja: murja
+	cp murja /opt/murja/
+
+# service magic
+
+# feuerx-upcloud% systemctl show --property=UnitPath
+# UnitPath=/etc/systemd/system.control /run/systemd/system.control /run/systemd/transie>
+
+/lib/systemd/system/Murja.unit: systemd/murja.unit
+	cp systemd/murja.unit /lib/systemd/system/Murja.unit
+	systemctl daemon-reload
+
+# the install job
+
+.PHONY: install
+install: murja
+	./bin/install.sh
+	# one can't `make` inside ./bin/install.sh
+	$(MAKE) /opt/murja/murja
+	$(MAKE) /lib/systemd/system/Murja.unit
+	chown -R murja:murja /opt/murja/
diff --git a/bin/install.sh b/bin/install.sh
new file mode 100755
index 0000000..f44697d
--- /dev/null
+++ b/bin/install.sh
@@ -0,0 +1,17 @@
+# warn if permissions are funny
+if [ "$(whoami)" != root ]; then 
+    echo "\`make install\` is expected to be run as root. You are $(whoami). Good luck!" 
+fi
+
+# ensure dst folder exists
+mkdir -p /opt/murja
+
+# ensure user exists
+if [ "$(uname)" == "Darwin" ]; then
+    echo "Do not mess with users in mac"
+elif grep murja /etc/passwd; then
+    echo "Found user murja from /etc/passwd"
+else
+    useradd --system -U -s /usr/bin/nologin murja
+    echo "Added new user murja"
+fi
diff --git a/systemd/murja.unit b/systemd/murja.unit
new file mode 100644
index 0000000..2914324
--- /dev/null
+++ b/systemd/murja.unit
@@ -0,0 +1,8 @@
+[Service]
+Type=simple
+User=murja
+Group=murja
+ExecStart=
+ExecStart=/opt/murja/murja
+Restart=always
+RestartSec=30
\ No newline at end of file