Merge pull request #4286 from hnyman/nano281
[feed/packages.git] / net / sysrepo / files / sysrepo.init
1 #!/bin/sh /etc/rc.common
2
3 START=70
4 STOP=10
5
6 USE_PROCD=1
7 PROG_DEAMON=/bin/sysrepod
8 PROG_PLUGIN=/bin/sysrepo-plugind
9
10 start_service() {
11 procd_open_instance
12 procd_set_param command ${PROG_DEAMON}
13 procd_append_param command -d -l 0
14 procd_set_param respawn
15 procd_close_instance
16
17 procd_open_instance
18 procd_set_param command ${PROG_PLUGIN}
19 procd_append_param command -d -l 0
20 procd_set_param respawn
21 procd_close_instance
22 }
23
24 stop_service()
25 {
26 if [ -f /etc/init.d/netopeer2-server ]; then
27 # netopeer2-server will automatically start sysrepod,
28 # so we need to stop it
29 /etc/init.d/netopeer2-server stop
30 sleep 1
31 fi
32 service_stop ${PROG_PLUGIN}
33 service_stop ${PROG_DEAMON}
34 }