shutil.copy('conf'+apache_conf, apache_conf)
os.system('/etc/init.d/apache2 reload')
-log_dir = '/var/log/telecaster'
-if not os.path.exists(log_dir):
- os.mkdir(log_dir)
- os.system('chown -R ' + user + ':' + user + ' ' + log_dir)
+log_dirs = ['/var/log/telecaster', '/var/log/deefuzzer']
+for dir in log_dirs:
+ if not os.path.exists(dir):
+ os.mkdir(dir)
+ os.system('chown -R ' + user + ':' + user + ' ' + dir)
print """
Installation successfull !
s.start()
time.sleep(1)
self.logger.write_info('starting')
-# form.stop_form(self.conference_dict, writing, casting)
self.main()
elif deefuzzer_pid != [] and os.path.exists(self.lock_file) and not form.has_key("action"):
import datetime
import time
import string
-import cgitb
from tools import *
from cgi import FieldStorage
-cgitb.enable()
class WebView(FieldStorage):
"""Gives the web CGI frontend"""
for k in range(0, self.len_departments):
department = self.departments[k]
conferences = department['conferences']
- #print conferences
conferences_t = dict2tuple(conferences)
- #print conferences
conferences = '"'+'","'.join(conferences_t)+'"'
print ' case '+str(k+1)+' : var text = new Array('+conferences+'); '
print ' break;'
print ' }'
print ' for(j = 0; j<'+str(self.conference_nb_max)+'; j++)'
print ' formulaire.conference.options[j+1].text=text[j];'
- #print ' formulaire.conference.options[j+1].value=text[j];'
print '}'
print ' formulaire.conference.selectedIndex=0;}'
print '</script>'
print "<div class=\"tools\">"
print "<form method=\"post\" action=\"telecaster.py\" name=\"formulaire\">"
print "<div class=\"buttons\">"
- print "<button><img src=\"img/arrow_refresh.png\" alt=\"\">Refresh</button>"
+ print "<button type=\"submit\"><img src=\"img/arrow_refresh.png\" alt=\"\">Refresh</button>"
print "<a href=\""+self.url+":"+self.port+"/"+self.mount_point+"\"><img src=\"img/control_play_blue.png\" alt=\"\">Play</a>"
print "<button type=\"submit\" name=\"action\" value=\"stop\" class=\"negative\"><img src=\"img/cancel.png\" alt=\"\">Stop</button>"
print "<a href=\"http://"+self.url+"/archives/\"><img src=\"img/folder_go.png\" alt=\"\">Archives</a>"