diff options
author | Hirokazu MORIKAWA <morikw2@gmail.com> | 2017-11-21 11:53:03 +0900 |
---|---|---|
committer | Hirokazu MORIKAWA <morikw2@gmail.com> | 2019-02-06 15:42:40 +0900 |
commit | f3ab4db2c8efe6f302e796ef125dd2c3116d97d4 (patch) | |
tree | 14694efe43e7bae808e7d6c7c097b2ad752f56af /lang/node-homebridge/files/homebridge.init | |
parent | 1b8d8770ff799a2e00b0a5079cee22fdb7a18f08 (diff) |
node-homebridge: add new package / Node.js HomeKit Server
Homebridge is a lightweight Node.js server you can run on your home network that emulates the iOS HomeKit API
Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
Diffstat (limited to 'lang/node-homebridge/files/homebridge.init')
-rw-r--r-- | lang/node-homebridge/files/homebridge.init | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lang/node-homebridge/files/homebridge.init b/lang/node-homebridge/files/homebridge.init new file mode 100644 index 000000000..cea6b87a7 --- /dev/null +++ b/lang/node-homebridge/files/homebridge.init @@ -0,0 +1,18 @@ +#!/bin/sh /etc/rc.common + +START=98 +USE_PROCD=1 + +start_service() { + [ -d /usr/share/homebridge ] || { + mkdir -m 0755 -p /usr/share/homebridge + chmod 0700 /usr/share/homebridge + chown homebridge:homebridge /usr/share/homebridge + } + procd_open_instance + procd_set_param command /usr/bin/homebridge -U /usr/share/homebridge + procd_set_param user homebridge + procd_set_param stdout 1 + procd_set_param stderr 1 + procd_close_instance +} |