2003-07-08 21:30:47 +00:00
|
|
|
#error 'this file is no longer used; cvs remove when ready'
|
|
|
|
|
2003-07-01 20:37:09 +00:00
|
|
|
// The contents of this file are subject to the BOINC Public License
|
2003-02-12 18:51:05 +00:00
|
|
|
// Version 1.0 (the "License"); you may not use this file except in
|
|
|
|
// compliance with the License. You may obtain a copy of the License at
|
2003-07-01 20:37:09 +00:00
|
|
|
// http://boinc.berkeley.edu/license_1.0.txt
|
2003-07-08 21:30:47 +00:00
|
|
|
//
|
2003-02-12 18:51:05 +00:00
|
|
|
// Software distributed under the License is distributed on an "AS IS"
|
|
|
|
// basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
|
|
|
|
// License for the specific language governing rights and limitations
|
2003-07-08 21:30:47 +00:00
|
|
|
// under the License.
|
|
|
|
//
|
|
|
|
// The Original Code is the Berkeley Open Infrastructure for Network Computing.
|
|
|
|
//
|
2003-02-12 18:51:05 +00:00
|
|
|
// The Initial Developer of the Original Code is the SETI@home project.
|
2003-07-01 20:37:09 +00:00
|
|
|
// Portions created by the SETI@home project are Copyright (C) 2002
|
2003-07-08 21:30:47 +00:00
|
|
|
// University of California at Berkeley. All Rights Reserved.
|
|
|
|
//
|
2003-02-12 18:51:05 +00:00
|
|
|
// Contributor(s):
|
|
|
|
//
|
|
|
|
|
2003-07-01 00:20:22 +00:00
|
|
|
#include <cstdio>
|
|
|
|
#include <cstdlib>
|
2003-02-12 18:51:05 +00:00
|
|
|
|
2003-08-15 00:45:25 +00:00
|
|
|
#include "sched_config.h"
|
2003-07-01 00:20:22 +00:00
|
|
|
#include "sched_util.h"
|
2003-02-12 18:51:05 +00:00
|
|
|
|
|
|
|
int main() {
|
2003-09-02 21:16:55 +00:00
|
|
|
SCHED_CONFIG config;
|
2003-02-12 23:06:49 +00:00
|
|
|
int i, retval;
|
2003-02-12 21:05:50 +00:00
|
|
|
char* p;
|
2003-02-12 18:51:05 +00:00
|
|
|
|
2003-07-02 02:02:18 +00:00
|
|
|
log_messages.set_debug_level(3);
|
2004-04-08 08:15:23 +00:00
|
|
|
log_messages.printf(SCHED_MSG_LOG::NORMAL, "Starting servers.\n");
|
2003-07-02 02:02:18 +00:00
|
|
|
++log_messages;
|
2003-07-01 00:20:22 +00:00
|
|
|
|
2003-02-12 18:51:05 +00:00
|
|
|
retval = config.parse_file();
|
|
|
|
if (retval) {
|
2004-04-08 08:15:23 +00:00
|
|
|
log_messages.printf(SCHED_MSG_LOG::CRITICAL, "Can't read config\n");
|
2003-02-12 18:51:05 +00:00
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
|
2003-02-12 21:05:50 +00:00
|
|
|
for (i=0; i<20; i++) {
|
|
|
|
p = config.start_commands[i];
|
|
|
|
if (!p) break;
|
2004-04-08 08:15:23 +00:00
|
|
|
log_messages.printf(SCHED_MSG_LOG::NORMAL, "Executing: %s\n", p);
|
2003-02-12 21:05:50 +00:00
|
|
|
system(p);
|
2003-02-12 18:51:05 +00:00
|
|
|
}
|
2003-07-02 02:02:18 +00:00
|
|
|
|
|
|
|
--log_messages;
|
2004-04-08 08:15:23 +00:00
|
|
|
log_messages.printf(SCHED_MSG_LOG::NORMAL, "Done.\n");
|
2003-07-02 02:02:18 +00:00
|
|
|
return 0;
|
2003-02-12 18:51:05 +00:00
|
|
|
}
|