]> git.evergreen-ils.org Git - working/NCIPServer.git/blob - bin/start_server.pl
Modify NCIP::ILS::Evergreen->find_location_failover.
[working/NCIPServer.git] / bin / start_server.pl
1 #!/usr/bin/perl 
2 #===============================================================================
3 #
4 #         FILE: test_server.pl
5 #
6 #        USAGE: ./test_server.pl
7 #
8 #  DESCRIPTION:
9 #
10 #      OPTIONS: ---
11 # REQUIREMENTS: ---
12 #         BUGS: ---
13 #        NOTES: ---
14 #       AUTHOR: Chris Cormack (rangi), chrisc@catalyst.net.nz
15 # ORGANIZATION: Koha Development Team
16 #      VERSION: 1.0
17 #      CREATED: 28/08/13 14:12:51
18 #     REVISION: ---
19 #===============================================================================
20
21 use strict;
22 use warnings;
23
24 use lib "lib";
25
26 use NCIPServer;
27 use Getopt::Long;
28
29 my $help;
30 my $config_dir;
31
32 GetOptions(
33     'h|help'     => \$help,
34     'c|config:s' => \$config_dir,
35 );
36 my $usage = << 'ENDUSAGE';
37
38 This script will start an NCIP server, using the configuration set in the config dir you pass
39
40 This script has the following parameters :
41     -h --help:   this message
42     -c --config: path to the configuration directory
43
44 ENDUSAGE
45
46 if ($help) {
47     print $usage;
48     exit;
49 }
50
51 if ( !$config_dir ) {
52     print "You must specify a configuration directory\n";
53     print $usage;
54     exit;
55 }
56
57 my $server = NCIPServer->new( { config_dir => $config_dir } );
58
59 $server->run();