diff options
author | Nuno Goncalves <nunojpg@gmail.com> | 2015-08-09 11:50:11 +0100 |
---|---|---|
committer | Nuno Goncalves <nunojpg@gmail.com> | 2015-08-09 11:50:11 +0100 |
commit | f5e6c1120ba50f81aa882badc2e356fa7518ca5d (patch) | |
tree | fa0b781120465cd1b15f81bf39dd0fb20becf221 /net/kplex/files | |
parent | 96bd9d4787220a99cfa3e0a2b42c34dcd365f5d6 (diff) |
kplex: add init script
Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>
Diffstat (limited to 'net/kplex/files')
-rw-r--r-- | net/kplex/files/kplex.init | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/net/kplex/files/kplex.init b/net/kplex/files/kplex.init new file mode 100644 index 000000000..8e48041b0 --- /dev/null +++ b/net/kplex/files/kplex.init @@ -0,0 +1,19 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2015 OpenWrt.org + +START=99 + +USE_PROCD=1 +PROG=/usr/bin/kplex + +CONF_FILE=/etc/kplex.conf + +start_service() { + [ -e "$CONF_FILE" ] || return 1 + + procd_open_instance + procd_set_param command "$PROG" -f "$CONF_FILE" + procd_set_param respawn + procd_set_param file "$CONF_FILE" + procd_close_instance +} |