diff --git a/port-files/Makefile b/port-files/Makefile index 5e5e53a..5689286 100644 --- a/port-files/Makefile +++ b/port-files/Makefile @@ -15,6 +15,8 @@ USE_QT5= concurrent core network buildtools qmake gui websockets USES= pkgconfig tar:xz qmake MAKE_ARGS= PREFIX=${STAGEDIR}${PREFIX} +USE_OPENRC_SUBR= sysadm sysadm-bridge sysadm-rest + USE_GITHUB= yes GH_ACCOUNT= pcbsd GH_PROJECT= sysadm diff --git a/port-files/files/sysadm-bridge.in b/port-files/files/sysadm-bridge.in new file mode 100755 index 0000000..17249cc --- /dev/null +++ b/port-files/files/sysadm-bridge.in @@ -0,0 +1,13 @@ +#!/sbin/openrc-run +# Copyright (c) 2016 Ken Moore +# Released under the 2-clause BSD license + +command="%%PREFIX%%/bin/sysadm-bridge" +command_args="&" +pid=/var/run/sysadm-bridge.pid +name="SysAdm Bridge" + +depend() { + need syscons network + after bootmisc +} diff --git a/port-files/files/sysadm-rest.in b/port-files/files/sysadm-rest.in new file mode 100755 index 0000000..3556a1e --- /dev/null +++ b/port-files/files/sysadm-rest.in @@ -0,0 +1,13 @@ +#!/sbin/openrc-run +# Copyright (c) 2016 Ken Moore +# Released under the 2-clause BSD license + +command="%%PREFIX%%/bin/sysadm-server" +command_args="-rest &" +pid=/var/run/sysadm-rest.pid +name="SysAdm Server (REST)" + +depend() { + need syscons network + after bootmisc +} diff --git a/port-files/files/sysadm.in b/port-files/files/sysadm.in new file mode 100755 index 0000000..4ad4758 --- /dev/null +++ b/port-files/files/sysadm.in @@ -0,0 +1,13 @@ +#!/sbin/openrc-run +# Copyright (c) 2016 Ken Moore +# Released under the 2-clause BSD license + +command="%%PREFIX%%/bin/sysadm-server" +command_args="&" +pid=/var/run/sysadm.pid +name="SysAdm Server (WebSocket)" + +depend() { + need syscons network + after bootmisc +} diff --git a/src/sysadm.pro b/src/sysadm.pro index 1e799bd..f3d7699 100644 --- a/src/sysadm.pro +++ b/src/sysadm.pro @@ -4,7 +4,7 @@ CONFIG += recursive SUBDIRS+= server bridge rcd.path = /usr/local/etc/rc.d/ -rcd.extra = cp rc.d/* $(INSTALL_ROOT)/usr/local/etc/rc.d/ +rcd.files = rc.d/sysadm rc.d/sysadm-rest rc.d/sysadm-bridge #dconf.path = /usr/local/etc/job.d/ #dconf.extra = cp job.d/* $(INSTALL_ROOT)/usr/local/etc/job.d/