mirror of
https://github.com/javalsai/lidm.git
synced 2025-08-30 18:08:00 +02:00
fix(Makefile): comprehensive runit installation
This commit is contained in:
36
Makefile
36
Makefile
@@ -62,7 +62,13 @@ install-service:
|
|||||||
elif command -v dinitctl &> /dev/null; then \
|
elif command -v dinitctl &> /dev/null; then \
|
||||||
make install-service-dinit; \
|
make install-service-dinit; \
|
||||||
elif command -v sv &> /dev/null; then \
|
elif command -v sv &> /dev/null; then \
|
||||||
make install-service-runit; \
|
if [ -d /etc/sv ]; then \
|
||||||
|
make install-service-runit-void; \
|
||||||
|
elif [ -d /etc/runit/sv ]; then \
|
||||||
|
make install-service-runit-artix; \
|
||||||
|
else \
|
||||||
|
printf '\033[1;31m%s\033[0m\n' "Unknown init system structure, skipping service install..."; \
|
||||||
|
fi \
|
||||||
elif command -v rc-update &> /dev/null; then \
|
elif command -v rc-update &> /dev/null; then \
|
||||||
make install-service-openrc; \
|
make install-service-openrc; \
|
||||||
elif command -v s6-service &> /dev/null; then \
|
elif command -v s6-service &> /dev/null; then \
|
||||||
@@ -71,34 +77,26 @@ install-service:
|
|||||||
printf '\033[1;31m%s\033[0m\n' "Unknown init system, skipping service install..."; \
|
printf '\033[1;31m%s\033[0m\n' "Unknown init system, skipping service install..."; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ETC_SV_EXISTS=$(shell [ -d /etc/sv ] && echo 1 || echo 0 )
|
|
||||||
install-service-systemd:
|
install-service-systemd:
|
||||||
install -m644 ./assets/services/systemd.service ${DESTDIR}/etc/systemd/system/lidm.service
|
install -m644 ./assets/services/systemd.service ${DESTDIR}/etc/systemd/system/lidm.service
|
||||||
@printf '\033[1m%s\033[0m\n\n' " don't forget to run 'systemctl enable lidm'"
|
@printf '\033[1m%s\033[0m\n\n' " don't forget to run 'systemctl enable lidm'"
|
||||||
install-service-dinit:
|
install-service-dinit:
|
||||||
install -m644 ./assets/services/dinit ${DESTDIR}/etc/dinit.d/lidm
|
install -m644 ./assets/services/dinit ${DESTDIR}/etc/dinit.d/lidm
|
||||||
@printf '\033[1m%s\033[0m\n\n' " don't forget to run 'dinitctl enable lidm'"
|
@printf '\033[1m%s\033[0m\n\n' " don't forget to run 'dinitctl enable lidm'"
|
||||||
install-service-runit:
|
install-service-runit-void:
|
||||||
ifeq ($(ETC_SV_EXISTS), 1)
|
mkdir -p ${DESTDIR}/etc/sv/lidm
|
||||||
mkdir -p ${DESTDIR}/etc/sv/lidm
|
cp -r --update=all ./assets/services/runit/* ${DESTDIR}/etc/sv/lidm/
|
||||||
cp -r --update=all ./assets/services/runit/* ${DESTDIR}/etc/sv/lidm/
|
@printf '\033[1m%s\033[0m\n\n' " don't forget to run 'ln -s ${DESTDIR}/etc/sv/lidm /var/service'"
|
||||||
@printf '\033[1m%s\033[0m\n\n' " don't forget to run 'ln -s ${DESTDIR}/etc/sv/lidm /var/service'"
|
install-service-runit-artix:
|
||||||
else
|
mkdir -p ${DESTDIR}/etc/runit/sv/lidm
|
||||||
mkdir -p ${DESTDIR}/etc/s6/sv/lidm
|
cp -r --update=all ./assets/services/runit/* ${DESTDIR}/etc/runit/sv/lidm/
|
||||||
cp -r --update=all ./assets/services/runit/* ${DESTDIR}/etc/s6/sv/lidm/
|
@printf '\033[1m%s\033[0m\n\n' " don't forget to run 'ln -s ${DESTDIR}/etc/runit/sv/lidm /run/runit/service'"
|
||||||
@printf '\033[1m%s\033[0m\n\n' " don't forget to run 'ln -s ${DESTDIR}/etc/s6/sv/lidm /var/service'"
|
|
||||||
endif
|
|
||||||
install-service-openrc:
|
install-service-openrc:
|
||||||
install -m755 ./assets/services/openrc ${DESTDIR}/etc/init.d/lidm
|
install -m755 ./assets/services/openrc ${DESTDIR}/etc/init.d/lidm
|
||||||
@printf '\033[1m%s\033[0m\n\n' " don't forget to run 'rc-update add lidm'"
|
@printf '\033[1m%s\033[0m\n\n' " don't forget to run 'rc-update add lidm'"
|
||||||
install-service-s6:
|
install-service-s6:
|
||||||
ifeq ($(ETC_SV_EXISTS), 1)
|
mkdir -p ${DESTDIR}/etc/s6/sv/lidm
|
||||||
mkdir -p ${DESTDIR}/etc/sv/lidm
|
cp -r --update=all ./assets/services/s6/* ${DESTDIR}/etc/s6/sv/lidm/
|
||||||
cp -r --update=all ./assets/services/s6/* ${DESTDIR}/etc/sv/lidm/
|
|
||||||
else
|
|
||||||
mkdir -p ${DESTDIR}/etc/s6/sv/lidm
|
|
||||||
cp -r --update=all ./assets/services/s6/* ${DESTDIR}/etc/s6/sv/lidm/
|
|
||||||
endif
|
|
||||||
@printf '\033[1m%s\033[0m\n\n' " don't forget to run 's6-service add default lidm' and 's6-db-reload'"
|
@printf '\033[1m%s\033[0m\n\n' " don't forget to run 's6-service add default lidm' and 's6-db-reload'"
|
||||||
|
|
||||||
pre-commit:
|
pre-commit:
|
||||||
|
Reference in New Issue
Block a user