Add (likely ugly) init script for openrc
This commit is contained in:
parent
a7bcf34432
commit
11256b5edf
2 changed files with 24 additions and 3 deletions
10
Makefile
10
Makefile
|
@ -3,6 +3,10 @@ PREFIX?=/usr/local
|
||||||
all: install
|
all: install
|
||||||
|
|
||||||
install:
|
install:
|
||||||
install -m 755 --owner root bin/uncloud-init $(PREFIX)/bin/uncloud-init
|
install -m 755 bin/uncloud-init $(PREFIX)/bin/uncloud-init
|
||||||
install -m 755 --owner root bin/uncloud-init-growpart $(PREFIX)/bin/uncloud-init-growpart
|
install -m 755 bin/uncloud-init-growpart $(PREFIX)/bin/uncloud-init-growpart
|
||||||
install -m 644 --owner root uncloud-init.service /etc/systemd/system/uncloud-init.service
|
if command -v systemd; then \
|
||||||
|
install -m 644 uncloud-init.service /etc/systemd/system/uncloud-init.service; \
|
||||||
|
else \
|
||||||
|
install -m 755 uncloud-init.rc /etc/init.d/uncloud-init; \
|
||||||
|
fi
|
||||||
|
|
17
uncloud-init.rc
Executable file
17
uncloud-init.rc
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/sbin/openrc-run
|
||||||
|
#
|
||||||
|
# FIXME: I am pretty sure this is not 'right' as I am not familiar with this
|
||||||
|
# init system and did not bother to read the docs throughoughly.
|
||||||
|
|
||||||
|
name="$RC_SVCNAME"
|
||||||
|
|
||||||
|
depend() {
|
||||||
|
use net logger
|
||||||
|
before sshd
|
||||||
|
}
|
||||||
|
|
||||||
|
start() {
|
||||||
|
ebegin "Starting uncloud-init"
|
||||||
|
logger /usr/local/bin/uncloud-init > /dev/null
|
||||||
|
eend $?
|
||||||
|
}
|
Loading…
Reference in a new issue