Add OpenRC initscript

This commit is contained in:
Taeyeon Mori
2018-03-19 17:27:27 +01:00
parent a210bf99f7
commit ba6f924f4f
2 changed files with 13 additions and 0 deletions

View File

@ -10,6 +10,7 @@ install:
install -Dm755 create_ap $(DESTDIR)$(BINDIR)/create_ap
install -Dm644 create_ap.conf $(DESTDIR)/etc/create_ap.conf
[ ! -d /lib/systemd/system ] || install -Dm644 create_ap.service $(DESTDIR)$(PREFIX)/lib/systemd/system/create_ap.service
[ ! -e /sbin/openrc-run ] || install -Dm755 create_ap.openrc $(DESTDIR)/etc/init.d/create_ap
install -Dm644 bash_completion $(DESTDIR)$(PREFIX)/share/bash-completion/completions/create_ap
install -Dm644 README.md $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md
@ -17,5 +18,6 @@ uninstall:
rm -f $(DESTDIR)$(BINDIR)/create_ap
rm -f $(DESTDIR)/etc/create_ap.conf
[ ! -f /lib/systemd/system/create_ap.service ] || rm -f $(DESTDIR)$(PREFIX)/lib/systemd/system/create_ap.service
[ ! -e /sbin/openrc-run ] || rm -f $(DESTDIR)/etc/init.d/create_ap
rm -f $(DESTDIR)$(PREFIX)/share/bash-completion/completions/create_ap
rm -f $(DESTDIR)$(PREFIX)/share/doc/create_ap/README.md

11
create_ap.openrc Normal file
View File

@ -0,0 +1,11 @@
#!/sbin/openrc-run
name=$RC_SVCNAME
cfgfile=/etc/$RC_SVCNAME.conf
pidfile=/run/$RC_SVCNAME.pid
command=/usr/bin/create_ap
command_args="--config $cfgfile"
command_args_background="--daemon --pidfile $pidfile"
stopsig=USR1