equal
deleted
inserted
replaced
64 // create directories |
64 // create directories |
65 @mkdir('./compiled'); |
65 @mkdir('./compiled'); |
66 |
66 |
67 // start up... |
67 // start up... |
68 |
68 |
69 status('Starting Greyhound Web Control v0.1a1'); |
69 status('Starting Greyhound Web Control v0.1a3'); |
70 status('loading files'); |
70 status('loading files'); |
71 |
71 |
72 require('webserver.php'); |
72 require('webserver.php'); |
73 define('SMARTY_DIR', GREY_ROOT . '/smarty/'); |
73 define('SMARTY_DIR', GREY_ROOT . '/smarty/'); |
74 require(GREY_ROOT . '/smarty/Smarty.class.php'); |
74 require(GREY_ROOT . '/smarty/Smarty.class.php'); |
75 require(GREY_ROOT . '/playlist.php'); |
75 require(GREY_ROOT . '/playlist.php'); |
76 require(GREY_ROOT . '/json.php'); |
76 require(GREY_ROOT . '/json.php'); |
77 require(GREY_ROOT . '/ajax.php'); |
77 require(GREY_ROOT . '/ajax.php'); |
78 require(GREY_ROOT . '/imagetools.php'); |
78 require(GREY_ROOT . '/imagetools.php'); |
79 |
|
80 status('doing home directory detection'); |
|
81 |
|
82 // get home directory |
|
83 |
|
84 if ( !isset($_ENV['HOME']) ) |
|
85 { |
|
86 burnout('Could not get your home directory'); |
|
87 } |
|
88 |
|
89 $homedir =& $_ENV['HOME']; |
|
90 |
79 |
91 // signal handler |
80 // signal handler |
92 function sigterm($signal) |
81 function sigterm($signal) |
93 { |
82 { |
94 global $httpd; |
83 global $httpd; |
98 |
87 |
99 status('initializing playlist'); |
88 status('initializing playlist'); |
100 |
89 |
101 // init playlist object |
90 // init playlist object |
102 $playlist = array(); |
91 $playlist = array(); |
|
92 $amarok_home = false; |
103 rebuild_playlist(); |
93 rebuild_playlist(); |
104 |
94 |
105 // startup webserver |
95 // startup webserver |
106 $ip = ( $public ) ? '0.0.0.0' : '127.0.0.1'; |
96 $ip = ( $public ) ? '0.0.0.0' : '127.0.0.1'; |
107 $port = 7447; |
97 $port = 7447; |