1
|
/*
|
2
|
* unix-scm.c - unix stubs for service control manager functions
|
3
|
*
|
4
|
* Copyright (c) 2010 Hamish Coleman <hamish@zot.org>
|
5
|
* 2003 Benjamin Schweizer <gopher at h07 dot org>
|
6
|
* 1998 Stephen Early <Stephen.Early@cl.cam.ac.uk>
|
7
|
*
|
8
|
*
|
9
|
* This program is free software; you can redistribute it and/or modify
|
10
|
* it under the terms of the GNU General Public License as published by
|
11
|
* the Free Software Foundation; either version 2 of the License, or
|
12
|
* (at your option) any later version.
|
13
|
*
|
14
|
* This program is distributed in the hope that it will be useful,
|
15
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
16
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
17
|
* GNU General Public License for more details.
|
18
|
*
|
19
|
* You should have received a copy of the GNU General Public License
|
20
|
* along with this program; if not, write to the Free Software
|
21
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
22
|
*/
|
23
|
|
24
|
#include <stdio.h>
|
25
|
#include <stdlib.h>
|
26
|
|
27
|
#include "scm.h"
|
28
|
|
29
|
int SCM_Start(struct SCM_def *sd, int argc, char **argv) {
|
30
|
sd->mode=SVC_CONSOLE;
|
31
|
|
32
|
int err;
|
33
|
|
34
|
if (sd->init) {
|
35
|
err = sd->init(argc,argv);
|
36
|
if (err!=0) {
|
37
|
return SVC_FAIL;
|
38
|
}
|
39
|
}
|
40
|
|
41
|
sd->main(argc,argv);
|
42
|
return SVC_OK;
|
43
|
}
|
44
|
|
45
|
char *SCM_Install(struct SCM_def *sd) {
|
46
|
return SVC_FAIL;
|
47
|
}
|
48
|
|
49
|
int SCM_Remove(struct SCM_def *sd) {
|
50
|
return SVC_FAIL;
|
51
|
}
|
52
|
|