X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=src%2Fmisc-progs%2Frestartntpd.c;fp=src%2Fmisc-progs%2Frestartntpd.c;h=0000000000000000000000000000000000000000;hp=416f5cef0324dc6575f891281e172a6a321bc2ef;hb=535628499c29897f4324ad033d357901f6f4101c;hpb=0a58fbcb92a5129f337d9dea5ea221ac19db09a0 diff --git a/src/misc-progs/restartntpd.c b/src/misc-progs/restartntpd.c deleted file mode 100644 index 416f5cef03..0000000000 --- a/src/misc-progs/restartntpd.c +++ /dev/null @@ -1,38 +0,0 @@ -/* IPFire helper program - restartntpd - * - * Starts or stops the ntpd daemon - * - */ - -#include -#include -#include -#include -#include -#include -#include "setuid.h" - - -int main(void) -{ - int fd = -1; - int enable = 0; - - if (!(initsetuid())) - exit(1); - - safe_system("/etc/rc.d/init.d/ntp stop 2>&1 >/dev/null"); - sleep(3); - - if ((fd = open(CONFIG_ROOT "/time/allowclients", O_RDONLY)) != -1) - { - close(fd); - enable = 1; - } - - if (enable) - { - safe_system("/etc/rc.d/init.d/ntp start 2>&1 >/dev/null"); - } - return 0; -}