#include <unistd.h>
#include <sys/types.h>
#include "xassert.h"
#include "xsignal.h"
#include "xsched.h"
#include "daemon.h"
#include "timer.h"
#include "opts.h"
#include "port.h"
#include "loop.h"

int main (int ac, char **av)
{
	opts_init (ac, av);

	xassert (!getuid(), "Program wymaga uprawnień roota.");

	daemon_init();
	port_init();
	xsched_init();
	xsignal_init();
	timer_init();

	loop();

	return 0;
}
