Ménage dans la partie wifi

A priori, le dossier wifi n'a pas de dépendance (enfin, un grep "bornes" -r
| grep import ne m'a rient donné). wifiweb, n'en parlons pas.
This commit is contained in:
Daniel STAN 2013-03-10 14:49:16 +01:00
parent 574a2aadf0
commit 21fc3e42d6
11 changed files with 1 additions and 0 deletions

View file

@ -1,29 +0,0 @@
/* A compiler avec gcc -Wall -ansi -static addip.c -o /var/www/cgi-bin/addip.cgi */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int main() {
FILE *fd;
char *ip;
if ((fd = fopen("/hotspot.socket", "a")) == NULL)
goto erreur;
if ((ip = getenv("REMOTE_ADDR")) == NULL)
goto erreur;
fprintf(fd, "%s\n", ip);
fflush(fd);
fclose(fd);
printf("Location: https://wifi.crans.org/wiki/WiFi(2f)PagesStatiques(2f)PortailCaptif(2f)AuthOk.html\r\n");
printf("\r\n");
return 0;
erreur:
printf("Location: https://wifi.crans.org/wiki/WiFi(2f)PagesStatiques(2f)PortailCaptif(2f)AuthErreur.html\r\n");
printf("\r\n");
return 0;
}