ich habe mal ein wenig mit der Suchfunktion

Kann man dieses nicht mit in den Timer integrieren ? So als manuellen Timer ? Leider habe ich vom Coden gar keine Ahnung

Hier nochmal der Code von Happydude :
Code:
#include <string.h>
#include <signal.h>
#include <unistd.h>
#include <sys/wait.h>
#include <plugin.h>
#define CONFIGFILE "/var/etc/ether-wake.conf"
#define ETHERWAKEBINARY "/bin/ether-wake"
void plugin_exec(PluginParam *par)
{
int macAddress[6];
char shellCommand[128];
char macAddressString[19];
FILE* fh;
if ((fh = fopen(CONFIGFILE, "r")))
{
if (fscanf(fh, "%2x:%2x:%2x:%2x:%2x:%2x", macAddress, macAddress+1, macAddress+2, macAddress+3, macAddress+4, macAddress+5) != 6)
{
printf("Fehler in %s\n", CONFIGFILE);
fclose(fh);
return;
}
fclose(fh);
strcpy(shellCommand, ETHERWAKEBINARY);
sprintf(macAddressString, " %02x:%02x:%02x:%02x:%02x:%02x", macAddress[0], macAddress[1], macAddress[2], macAddress[3], macAddress[4], macAddress[5]);
strcat(shellCommand, macAddressString);
system (shellCommand);
}
else
{
printf("%s konnte nicht geoeffnet werden\n", CONFIGFILE);
}
}
Vielleicht hat einer mal Lust das zu coden ?
Merci vielmals
Marcedi