]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - src/misc-progs/restartapplejuice.c
Einige Dateien hatten perm:755...
[people/pmueller/ipfire-2.x.git] / src / misc-progs / restartapplejuice.c
CommitLineData
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
16int 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}