feat: add dinit support

This commit is contained in:
2024-07-26 16:40:46 +02:00
parent 844687809b
commit a32e4a577f
7 changed files with 55 additions and 10 deletions

View File

@@ -27,10 +27,21 @@ clean:
# 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/; \
install -m755 ./lidm /usr/bin
install -m755 ./themes/default.ini /etc/lidm.ini
install-service:
@if command -v systemctl &> /dev/null; then \
make install-service-systemd; \
elif command -v dinitctl &> /dev/null; then \
make install-service-dinit; \
else \
echo "No systemd"; \
printf '\x1b[1;31m%s\x1b[0m\n' "Unknown init system, skipping install..."; \
fi
install-service-systemd:
install -m755 ./assets/services/systemd.service /etc/systemd/system/lidm.service
@printf '\x1b[1m%s\x1b[0m\n\n' " don't forget to run 'systemctl enable lidm'"
install-service-dinit:
install -m755 ./assets/services/dinit /etc/dinit.d/lidm
@printf '\x1b[1m%s\x1b[0m\n\n' " don't forget to run 'dinitctl enable lidm'"