Alternc  latest
Alternc logiel libre pour l'hébergement
 All Classes Namespaces Files Functions Variables Pages
update_upnp.sh
Go to the documentation of this file.
1 #!/usr/bin/php
2 <?php
3 
4 $f=@fopen("/etc/alternc/local.sh","rb");
5 if (!$f) {
6  echo "Can't find /etc/alternc/local.sh, please install AlternC properly !\n";
7  exit();
8 }
9 
10 $ALTERNC_LOC="";
11 while ($s=fgets($f,1024)) {
12  if (strpos($s,"=")!==false) {
13  list($key,$val)=explode("=",trim($s),2);
14  if (trim($key)=="ALTERNC_LOC") {
15  $val=trim(trim($val,"'\""));
16  $ALTERNC_LOC=$val;
17  break;
18  }
19  }
20 
21 }
22 fclose($f);
23 if (!$ALTERNC_LOC) {
24  echo "Can't find ALTERNC_LOC in /etc/alternc/local.sh, please install AlternC properly !\n";
25  exit();
26 }
27 
28 require_once($ALTERNC_LOC."/class/config_nochk.php");
29 
30 $upnp->cron();
31