]>
Commit | Line | Data |
---|---|---|
a79906a4 MT |
1 | /* IFire helper program - restartapplejuice |
2 | * | |
3 | * Starts or stops the applejuice core | |
4 | * | |
5 | */ | |
6 | ||
7 | #include <stdio.h> | |
8 | #include <string.h> | |
9 | #include <unistd.h> | |
10 | #include <stdlib.h> | |
11 | #include <sys/types.h> | |
12 | #include <fcntl.h> | |
13 | #include "setuid.h" | |
14 | ||
15 | ||
16 | int main(void) | |
17 | { | |
18 | if (!(initsetuid())) | |
19 | exit(1); | |
20 | ||
21 | safe_system("/etc/init.d/applejuice stop"); | |
22 | sleep(3); | |
23 | safe_system("/etc/init.d/applejuice start"); | |
24 | ||
25 | return 0; | |
26 | } |