root/branches/dsss-smi/init.php

Revision 214, 370 bytes (checked in by Gregor, 2 years ago)

init.php: Slightly more sane defaults for sources/ dir :)

Line 
1 <?PHP
2 if (file_exists("pws.php")) {
3     die("This SMI appears to be initialized already!");
4 }
5
6 // write pws.php
7 $pws = fopen("pws.php", "w");
8 if ($pws === false) die("Can't write to pws.php!");
9
10 fwrite($pws, "<?PHP\n\$pws = array(\n0);\n?>\n");
11 fclose($pws);
12 chmod("pws.php", 0600);
13
14 // make the sources dir
15 mkdir("sources");
16 chmod("sources", 0755);
17
18 print "Done.";
19 ?>
Note: See TracBrowser for help on using the browser.