From 9e7bfa88ca457b60e5f03ab54737e2feb1f565b0 Mon Sep 17 00:00:00 2001 From: Shawn Kwang Date: Fri, 20 May 2016 12:57:51 -0500 Subject: [PATCH] Changed mkdir2 function to check if directory already exists, and updated it to raise an exception if there is a problem otherwise. Added some text for the enduser to change apache 2.4 conf and add the project name and copyright holder. --- py/Boinc/setup_project.py | 8 ++++---- tools/make_project | 9 +++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/py/Boinc/setup_project.py b/py/Boinc/setup_project.py index ea0a7a9ad6..c63520bf82 100644 --- a/py/Boinc/setup_project.py +++ b/py/Boinc/setup_project.py @@ -247,9 +247,10 @@ def create_project_dirs(dest_dir): return apply(os.path.join,(dest_dir,)+d) def mkdir2(d): try: - os.mkdir(d); - except: - pass + os.makedirs(d) + except OSError as e: + if not os.path.isdir(d): + raise SystemExit(e) map(lambda d: mkdir2(dir(d)), [ '', 'cgi-bin', @@ -273,7 +274,6 @@ def create_project_dirs(dest_dir): 'html/ops/ffmail', 'html/ops/mass_email', 'html/ops/remind_email', - 'html/ops', 'html/project', 'html/stats', 'html/user', diff --git a/tools/make_project b/tools/make_project index 2bd08ff9ae..6562296584 100755 --- a/tools/make_project +++ b/tools/make_project @@ -456,9 +456,13 @@ print >>open(readme_filename,'w'), '''Steps to complete installation: - Change Apache configuration (as root): + If you are using Apache 2.4, edit the %(httpd_conf_template_filename)s + (see file for specific instructions). + cat %(httpd_conf_template_filename)s >> /etc/apache/httpd.conf (path to httpd.conf varies; try /etc/httpd/ or /etc/apache2) + Then restart the web server: /usr/sbin/apache2ctl restart @@ -478,6 +482,11 @@ print >>open(readme_filename,'w'), '''Steps to complete installation: htpasswd -c .htpasswd username +- Add the project name and copyright holder for the boinc Web site: + + edit html/project/project.inc + + change PROJECT and COPYRIGHT_HOLDER ---------------------------- To start, show status, and stop the project, run: