mirror of
https://github.com/javalsai/lidm.git
synced 2025-08-30 18:08:00 +02:00
feat: add dinit support
This commit is contained in:
21
Makefile
21
Makefile
@@ -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'"
|
||||
|
Reference in New Issue
Block a user