From 083000ad626c7ba9761eb38a1b43df8416b1c4a9 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 19 Oct 2006 18:42:31 +0000 Subject: [PATCH] *** empty log message *** svn path=/trunk/boinc/; revision=11315 --- checkin_notes | 18 +++++++++++++++++- doc/addons.php | 14 ++++++++++---- doc/project_daemons.php | 11 ++++------- doc/project_tasks.php | 20 ++++++++++++++++---- py/Boinc/setup_project.py | 2 +- tools/run_in_ops | 2 ++ 6 files changed, 50 insertions(+), 17 deletions(-) create mode 100755 tools/run_in_ops diff --git a/checkin_notes b/checkin_notes index 9df71670a5..049996570b 100755 --- a/checkin_notes +++ b/checkin_notes @@ -11225,4 +11225,20 @@ Rytis 19 Oct 2006 user/ create_account.php inc/ - xml.inc \ No newline at end of file + xml.inc + +David 19 Oct 2006 + - project back end: add mechanism so that PHP scripts can be + run from the 'start' script in a way that works + with both PHP4 and PHP5. + To run html/ops/update_profile_pages.php, for example, put + run_in_ops update_profile_pages.php + in your config.xml file entry. + + (run_in_ops is a script that lives in bin/, + cds into ../html/ops, and executes its args) + + py/Boinc/ + setup_project.py + tools/ + run_in_ops (new) diff --git a/doc/addons.php b/doc/addons.php index 2a7312f957..7b253237ca 100644 --- a/doc/addons.php +++ b/doc/addons.php @@ -22,8 +22,8 @@ If this is not enough you should contact the author. Instructions for installing and running BOINC are here.
  • -To submit an add-on for inclusion in this list, please -email David Anderson. +To submit an add-on for inclusion in this list, +please email David Anderson. "; @@ -46,8 +46,13 @@ function show_group($name, $list) { $version = $item[2]; if (!$version) $version ='
    '; $desc = $item[3]; + if (strstr($file, 'http://')) { + $url = $file; + } else { + $url = "addons/$file"; + } echo " - $itemname + $itemname $version $desc @@ -73,7 +78,8 @@ array('SETITracker_V1.0BETA.zip', 'SETI@Boinc Tracker', '1.0BETA', 'SETI@Boinc T array('SetiMapView_Setup_v6.54.exe', 'SETI@home-MapView', '6.54', 'SETI@home-Mapview creates skymaps for the BOINC projects SETI@home-II, Einstein@home and Astropulse.'), array('DBSetup.zip', 'SQL Setup for BoincSpy', 'V 0.7', 'Stores Workunits into SQL database'), array('spy_pp_v101_setispy_v341.zip', 'Spy++', '', 'Loader for the new version of SetiSpy (3.4.1), the famous SETI addon of Roelof'), -array('tminst112.zip', 'ThreadMaster', '1.12build128', 'Control max CPU usage and prevent overheat'), +array('http://threadmaster.tripod.com/', 'ThreadMaster', '', 'Control max CPU usage and prevent overheating (not specific to BOINC)'), +array('http://mion.faireal.net/BES/', 'BES', '', 'Control max CPU usage and prevent overheating (not specific to BOINC)'), array('boinclogger.zip', 'boinc logger', '1.0', 'saves the messages part of boinc so you can track down errors'), array('inst_nB_v13.exe', 'nBOiNC', '1.3.x', 'stats picker'), ); diff --git a/doc/project_daemons.php b/doc/project_daemons.php index daf854c883..b0ea32a1f0 100644 --- a/doc/project_daemons.php +++ b/doc/project_daemons.php @@ -25,10 +25,10 @@ echo html_text(" list_start(); list_item("cmd", "The command used to start the daemon. - This command will be run in the project's bin/ directory." + Must be a program in the project's bin/ directory." ); list_item("host", - "Specifies where the daemon should run. + "Specifies the host on which the daemon should run. The default is the project's main host, as specified in config.xml." ); @@ -36,13 +36,13 @@ list_item("disabled", "If nonzero, ignore this entry" ); list_item("output", - "Name of output file. + "Name of output file (in the log_HOSTNAME directory). Defaults to the program name followed by '.log'. If you're running multiple instances of a daemon on one host, you must specify this." ); list_item("pid_file", - "Name of file used to store the process ID. + "Name of file used to store the process ID (in the pid_HOSTNAME directory). Defaults to the program name followed by '.pid'. If you're running multiple instances of a daemon on one host, you must specify this." @@ -55,9 +55,6 @@ Daemons are started when you run the bin/start script, and killed (by a SIGHUP signal) when you run bin/stop. -The process ID is recorded in the <pid_dir> directory -By convention, daemon X running on host Y -writes it log output to log_Y/X.log.

    Typically, this mechanism is used to run diff --git a/doc/project_tasks.php b/doc/project_tasks.php index b2d4dc88b8..fb4b604001 100644 --- a/doc/project_tasks.php +++ b/doc/project_tasks.php @@ -43,7 +43,19 @@ list_start(); list_item( "cmd", "The command used to perform the task. - This command will be run in the <bin_dir> directory." + Must be a program in the project's /bin directory. +

    + You can run PHP scripts as periodic tasks. + These scripts must be in the html/ops/ directory, + and can be run with a command of the form +

    run_in_ops scriptname
    + The script should be executable, and should have the form +
    +#! /usr/bin/env php
    +<?php
    +...
    +?>
    +"
     );
     list_item("host",
         "Specifies where the daemon shoulr run.
    @@ -86,7 +98,7 @@ list_item("db_dump",
         Details are here.
         Recommended period: 7 days."
     );
    -list_item("update_profile_pages",
    +list_item("update_profile_pages.php",
         "Generate HTML files with lists of links to user profiles,
         organized alphabetically and by country.
         Recommended period: a few days."
    @@ -100,11 +112,11 @@ list_item("update_stats -update_teams -update_users -update_hosts",
         or use recent credit to enable message-board posting.
         Recommended period: every few days."
     );
    -list_item("update_uotd",
    +list_item("update_uotd.php",
         "Select a new User of the Day.
         Period: 1 day."
     );
    -list_item("../html/ops/update_forum_activities.php",
    +list_item("update_forum_activities.php",
         "Recompute 'popularity' estimages for threads and posts
         in the Questions and Answers message boards.
         Recommended period: 1 hour."
    diff --git a/py/Boinc/setup_project.py b/py/Boinc/setup_project.py
    index f50981e50e..aa843e3852 100644
    --- a/py/Boinc/setup_project.py
    +++ b/py/Boinc/setup_project.py
    @@ -349,7 +349,7 @@ def install_boinc_files(dest_dir):
         force_symlink(dir('bin', 'start'), dir('bin', 'stop'))
         force_symlink(dir('bin', 'start'), dir('bin', 'status'))
         map(lambda (s): install(srcdir('tools',s), dir('bin',s)),
    -        [ 'create_work', 'add', 'xadd', 'dbcheck_files_exist',
    +        [ 'create_work', 'add', 'xadd', 'dbcheck_files_exist', 'run_in_ops',
               'update_versions', 'parse_config', 'grep_logs', 'db_query',
               'watch_tcp', 'sign_executable', 'dir_hier_move', 'dir_hier_path' ])
         map(lambda (s): install(srcdir('py/Boinc',s), dir('bin',s)),
    diff --git a/tools/run_in_ops b/tools/run_in_ops
    new file mode 100755
    index 0000000000..ebde8831d9
    --- /dev/null
    +++ b/tools/run_in_ops
    @@ -0,0 +1,2 @@
    +#! /bin/sh
    +cd ../html/ops; ${*}