do_service: Initialize idx to 0

If index is not explicitly specified for service_started_daemon, it will
look for daemons by random index.

This fixes #100.
This commit is contained in:
Sven Wegener 2016-10-04 11:30:02 +02:00 committed by William Hubbs
parent deaae7ab5c
commit 78146b0e14

View File

@ -36,7 +36,7 @@ int main(int argc, char **argv)
bool ok = false;
char *service;
char *exec;
int idx;
int idx = 0;
RC_SERVICE state, bit;
applet = basename_c(argv[0]);