diff --git a/Makefile b/Makefile index 6336bcf..7ad642b 100644 --- a/Makefile +++ b/Makefile @@ -24,3 +24,13 @@ lidm: $(OBJ) .PHONY: clean clean: rm -f $(ODIR)/*.o *- li $(INCDIR)/*- + +# Copy lidm to /usr/bin +install: lidm + install -m 755 lidm /usr/bin + if command -v systemctl &> /dev/null; then \ + echo "Systemd exists, copying service file"; \ + cp assets/li.service /etc/systemd/system/; \ + else \ + echo "No systemd"; \ + fi diff --git a/assets/li.service b/assets/li.service index b3c76a0..ffe405c 100644 --- a/assets/li.service +++ b/assets/li.service @@ -6,7 +6,7 @@ Conflicts=getty@tty3.service [Service] Type=idle -ExecStart=$HOME/git/lidm/assets/li.service +ExecStart=/usr/bin/lidm StandardError=journal StandardInput=tty TTYPath=/dev/tty3