detects if systemd is there

This commit is contained in:
DeaDvey 2024-07-26 04:15:11 +01:00
parent cb853cb379
commit a15b49ec24
2 changed files with 11 additions and 1 deletions

View File

@ -24,3 +24,13 @@ lidm: $(OBJ)
.PHONY: clean .PHONY: clean
clean: clean:
rm -f $(ODIR)/*.o *- li $(INCDIR)/*- 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

View File

@ -6,7 +6,7 @@ Conflicts=getty@tty3.service
[Service] [Service]
Type=idle Type=idle
ExecStart=$HOME/git/lidm/assets/li.service ExecStart=/usr/bin/lidm
StandardError=journal StandardError=journal
StandardInput=tty StandardInput=tty
TTYPath=/dev/tty3 TTYPath=/dev/tty3