diff options
author | Mislav Novakovic <mislav.novakovic@sartura.hr> | 2017-05-24 17:08:19 +0200 |
---|---|---|
committer | Mislav Novakovic <mislav.novakovic@sartura.hr> | 2017-05-24 17:38:27 +0200 |
commit | 0aa8371086e577aa6610b4a9e7fd38bbad580a77 (patch) | |
tree | 434cac49035593791830c947cb0857f64e400f6b /net/sysrepo/files | |
parent | 835c56a4ccd9f26b314ffc3b18bc1c4c41afc092 (diff) |
sysrepo: merge sysrepod and sysrepo-plugind
Signed-off-by: Mislav Novakovic <mislav.novakovic@sartura.hr>
Diffstat (limited to 'net/sysrepo/files')
-rw-r--r-- | net/sysrepo/files/sysrepo-plugind.init | 19 | ||||
-rw-r--r-- | net/sysrepo/files/sysrepo.init | 34 | ||||
-rw-r--r-- | net/sysrepo/files/sysrepod.init | 19 |
3 files changed, 34 insertions, 38 deletions
diff --git a/net/sysrepo/files/sysrepo-plugind.init b/net/sysrepo/files/sysrepo-plugind.init deleted file mode 100644 index d394256ae..000000000 --- a/net/sysrepo/files/sysrepo-plugind.init +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=90 -STOP=10 - -USE_PROCD=1 -PROG=/bin/sysrepo-plugind - -start_service() { - procd_open_instance - procd_set_param command $PROG - procd_set_param respawn - procd_close_instance -} - -stop_service() -{ - service_stop ${PROG} -} diff --git a/net/sysrepo/files/sysrepo.init b/net/sysrepo/files/sysrepo.init new file mode 100644 index 000000000..9c9262c37 --- /dev/null +++ b/net/sysrepo/files/sysrepo.init @@ -0,0 +1,34 @@ +#!/bin/sh /etc/rc.common + +START=70 +STOP=10 + +USE_PROCD=1 +PROG_DEAMON=/bin/sysrepod +PROG_PLUGIN=/bin/sysrepo-plugind + +start_service() { + procd_open_instance + procd_set_param command ${PROG_DEAMON} + procd_append_param command -d -l 0 + procd_set_param respawn + procd_close_instance + + procd_open_instance + procd_set_param command ${PROG_PLUGIN} + procd_append_param command -d -l 0 + procd_set_param respawn + procd_close_instance +} + +stop_service() +{ + if [ -f /etc/init.d/netopeer2-server ]; then + # netopeer2-server will automatically start sysrepod, + # so we need to stop it + /etc/init.d/netopeer2-server stop + sleep 1 + fi + service_stop ${PROG_PLUGIN} + service_stop ${PROG_DEAMON} +} diff --git a/net/sysrepo/files/sysrepod.init b/net/sysrepo/files/sysrepod.init deleted file mode 100644 index 843e3b56c..000000000 --- a/net/sysrepo/files/sysrepod.init +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh /etc/rc.common - -START=70 -STOP=10 - -USE_PROCD=1 -PROG=/bin/sysrepod - -start_service() { - procd_open_instance - procd_set_param command $PROG - procd_set_param respawn - procd_close_instance -} - -stop_service() -{ - service_stop ${PROG} -} |