mirror of
https://github.com/javalsai/lidm.git
synced 2025-07-06 07:48:42 +02:00
fix(Makedile): proper service install recipes
update docs too
This commit is contained in:
parent
e8a9e57af9
commit
f67e30991a
10
INSTALL.md
10
INSTALL.md
@ -39,9 +39,15 @@ make install-service
|
||||
# or if you don't like autodetection
|
||||
make install-service-systemd # systemd
|
||||
make install-service-dinit # dinit
|
||||
make install-service-runit # runit
|
||||
make install-service-runit # runit (/etc/sv)
|
||||
make install-service-runit-etc # runit (/etc/runit/sv)
|
||||
make install-service-openrc # openrc
|
||||
make install-service-s6 # s6
|
||||
make install-service-s6 # s6 (/etc/sv)
|
||||
make install-service-s6-etc # s6 (/etc/s6/sv)
|
||||
|
||||
# For runit and s6, some distros (e.g. Artix) like to put it in /etc/<init>/sv
|
||||
# to better isolate their packages while other distros (e.g. Void) just put it
|
||||
# in /etc/sv
|
||||
```
|
||||
|
||||
# AUR
|
||||
|
47
Makefile
47
Makefile
@ -63,18 +63,24 @@ install-service:
|
||||
make install-service-dinit; \
|
||||
elif command -v sv &> /dev/null; then \
|
||||
if [ -d /etc/sv ]; then \
|
||||
make install-service-runit-void; \
|
||||
make install-service-runit; \
|
||||
elif [ -d /etc/runit/sv ]; then \
|
||||
make install-service-runit-artix; \
|
||||
make install-service-runit-etc; \
|
||||
else \
|
||||
printf '\033[1;31m%s\033[0m\n' "Unknown init system structure, skipping service install..."; \
|
||||
printf '\033[31m%s\033[0m\n' "Unknown init system structure, skipping service install..." >&2; \
|
||||
fi \
|
||||
elif command -v rc-update &> /dev/null; then \
|
||||
make install-service-openrc; \
|
||||
elif command -v s6-service &> /dev/null; then \
|
||||
make install-service-s6; \
|
||||
if [ -d /etc/sv ]; then\
|
||||
make install-service-s6; \
|
||||
elif [ -d /etc/r6nit/sv ]; then \
|
||||
make install-service-s6-etc; \
|
||||
else \
|
||||
printf '\033[31m%s\033[0m\n' "Unknown init system structure, skipping service install..." >&2; \
|
||||
fi \
|
||||
else \
|
||||
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
|
||||
|
||||
install-service-systemd:
|
||||
@ -83,18 +89,37 @@ install-service-systemd:
|
||||
install-service-dinit:
|
||||
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'"
|
||||
install-service-runit-void:
|
||||
mkdir -p ${DESTDIR}/etc/sv/lidm
|
||||
install-service-runit:
|
||||
@if [ ! -e /etc/sv ] && [ -z "$FORCE" ]; then \
|
||||
printf '\033[31m%s\033[0m\n' "${DESTDIR}/etc/sv doesn't exist" >&2 \
|
||||
exit 1 \
|
||||
fi
|
||||
mkdir -p ${DESTDIR}/etc/runit/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'"
|
||||
install-service-runit-artix:
|
||||
install-service-runit-etc:
|
||||
@if [ ! -e /etc/runit/sv ] && [ -z "$FORCE" ]; then \
|
||||
printf '\033[31m%s\033[0m\n' "${DESTDIR}/etc/s6/sv doesn't exist" >&2 \
|
||||
exit 1 \
|
||||
fi
|
||||
mkdir -p ${DESTDIR}/etc/runit/sv/lidm
|
||||
cp -r --update=all ./assets/services/runit/* ${DESTDIR}/etc/runit/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'"
|
||||
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/s6/sv/lidm /var/service'"
|
||||
install-service-openrc:
|
||||
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'"
|
||||
install-service-s6:
|
||||
@if [ ! -e "${DESTDIR}/etc/sv" ] && [ -z "$FORCE" ]; then \
|
||||
printf '\033[31m%s\033[0m\n' "${DESTDIR}/etc/sv doesn't exist" >&2 \
|
||||
exit 1 \
|
||||
fi
|
||||
mkdir -p ${DESTDIR}/etc/sv/lidm
|
||||
cp -r --update=all ./assets/services/s6/* ${DESTDIR}/etc/sv/lidm/
|
||||
install-service-s6-etc:
|
||||
@if [ ! -e "${DESTDIR}/etc/s6/sv" ] && [ -z "$FORCE" ]; then \
|
||||
printf '\033[31m%s\033[0m\n' "${DESTDIR}/etc/s6/sv doesn't exist" >&2 \
|
||||
exit 1 \
|
||||
fi
|
||||
mkdir -p ${DESTDIR}/etc/s6/sv/lidm
|
||||
cp -r --update=all ./assets/services/s6/* ${DESTDIR}/etc/s6/sv/lidm/
|
||||
@printf '\033[1m%s\033[0m\n\n' " don't forget to run 's6-service add default lidm' and 's6-db-reload'"
|
||||
@ -112,8 +137,10 @@ print-version:
|
||||
install uninstall \
|
||||
install-service \
|
||||
install-service-s6 \
|
||||
install-service-s6-etc \
|
||||
install-service-dinit \
|
||||
install-service-runit \
|
||||
install-service-runit-etc \
|
||||
install-service-openrc \
|
||||
install-service-systemd \
|
||||
pre-commit \
|
||||
|
@ -4,7 +4,7 @@ This folder contains the files necessary to set up lidm on start up for the supp
|
||||
|
||||
If you don't know what a init system is, you're certainly using `systemd`.
|
||||
|
||||
There's make scripts to automatically copy the service files to the proper locations, you just have to run `make install-service-$INIT`. `make install-service` will attempt to detect the init system in use and install for it.
|
||||
There's make scripts to automatically copy the service files to the proper locations, you just have to run `make install-service-$INIT` (or `make install-service-$INIT-etc`). `make install-service` will attempt to detect the init system in use and install for it.
|
||||
|
||||
The manual steps for installation are:
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user