diff --git a/Makefile b/Makefile index 57911b5..5ad53c6 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/create_ap.openrc b/create_ap.openrc new file mode 100644 index 0000000..9bb4876 --- /dev/null +++ b/create_ap.openrc @@ -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