Changeset 2162
- Timestamp:
- 01/16/19 15:08:45 (5 years ago)
- Location:
- trunk
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts-Web/etc/httpd/latmos-accounts-web.conf
r561 r2162 1 <IfModule mod_proxy.c> 2 <Proxy *> 3 Order deny,allow 4 Allow from all 5 </Proxy> 1 <Location /> 2 Order allow,deny 3 Allow From all 4 Satisfy any 6 5 7 # ReverseProxy 8 ProxyRequests Off 9 ProxyPass / http://localhost:4000/ 10 ProxyPassReverse / http://localhost:4000/ 11 </IfModule> 6 Options ExecCGI 7 AddHandler fcgid-script .pl 8 </Location> 12 9 13 <IfModule mod_cache.c> 14 CacheDisable / 15 </IfModule> 10 FcgidPassHeader Authorization 11 Alias / /var/www/cgi-bin/latmos_accounts_web_fastcgi.pl/ -
trunk/LATMOS-Accounts-Web/etc/init.d/latmos-accounts-web
r666 r2162 21 21 function start () { 22 22 gprintf "Starting %s: " "$prog" 23 daemon --user $USER /usr/bin/latmos_accounts_web_server.pl - -daemon --fork --port $PORT --host localhost --forcehttps2>/dev/null23 daemon --user $USER /usr/bin/latmos_accounts_web_server.pl -p $PORT --host localhost --background 2>/dev/null 24 24 [ $? -eq 0 ] && success || failure 25 25 touch /var/lock/subsys/$prog -
trunk/LATMOS-Accounts-Web/latmos-accounts-web.spec.in
r2153 r2162 78 78 install -m 640 etc/httpd/latmos-accounts-web.conf %buildroot/%_sysconfdir/httpd/conf/webapps.d/ 79 79 80 mkdir -p %buildroot /%_sysconfdir/init.d81 install -m 750 etc/init.d/latmos-accounts-web %buildroot/%_sysconfdir/init.d/latmos-accounts-web80 mkdir -p %buildroot%_sysconfdir/sudoers.d 81 install -m 644 etc/sudoers.d/latmos-accounts %buildroot%_sysconfdir/sudoers.d/ 82 82 83 83 %clean 84 84 rm -rf %buildroot 85 85 86 %preun87 %_preun_service %name88 89 86 %post 90 %_post_service %name91 87 if [ "$1" -ge "1" ] ; then 92 /sbin/service %namerestart88 /sbin/service httpd restart 93 89 fi 94 90 95 91 %triggerpostun -- latmos-accounts 96 /sbin/service %namerestart92 /sbin/service httpd restart 97 93 98 94 %files … … 105 101 %_var/www/*/*.pl 106 102 %config(noreplace) %_sysconfdir/httpd/conf/webapps.d/* 107 %_sysconfdir/init.d/latmos-accounts-web108 103 %config(noreplace) %_sysconfdir/latmos-accounts/* -
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web.pm
r2157 r2162 25 25 /; 26 26 27 our $VERSION = '5.2.3 1';27 our $VERSION = '5.2.33'; 28 28 29 29 # Configure the application. 30 __PACKAGE__->config( 31 encoding => 'UTF-8', 32 'Plugin::I18N' => { 33 'maketext_options' => { 34 Decode => 1 35 } 36 } 37 ); 30 38 31 39 # Default value for active/inactive features … … 105 113 }; 106 114 107 __PACKAGE__->config->{'Plugin::I18N'} = {108 'maketext_options' => {109 Decode => 0110 }111 };112 113 114 115 # 1 week for session 115 116 __PACKAGE__->config->{'Plugin::Session'} = { -
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Model/AttrForms.pm
r2155 r2162 6 6 use LATMOS::Accounts::Log; 7 7 use HTML::Prototype; 8 use utf8; 8 9 9 10 =head1 NAME … … 347 348 or return $attr; 348 349 my $label = $oattr->label; 349 utf8::encode($label);350 350 return $label; 351 351 } -
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/View/TT.pm
r1326 r2162 12 12 PRE_PROCESS => 'includes/defs.tt', 13 13 WRAPPER => 'includes/wrapper.tt', 14 ENCODING => 'utf-8', 14 15 ); 15 16 -
trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/View/TTpart.pm
r1081 r2162 11 11 ], 12 12 PRE_PROCESS => 'includes/defs.tt', 13 ENCODING => 'utf-8', 13 14 ); 14 15 -
trunk/LATMOS-Accounts-Web/script/latmos_accounts_web_cgi.pl
r94 r2162 1 #!/usr/bin/ perl -w1 #!/usr/bin/env perl 2 2 3 BEGIN { $ENV{CATALYST_ENGINE} ||= 'CGI' } 4 5 use strict; 6 use warnings; 7 use FindBin; 8 use lib "$FindBin::Bin/../lib"; 9 use LATMOS::Accounts::Web; 10 11 LATMOS::Accounts::Web->run; 3 use Catalyst::ScriptRunner; 4 Catalyst::ScriptRunner->run('LATMOS::Accounts::Web', 'CGI'); 12 5 13 6 1; … … 23 16 =head1 DESCRIPTION 24 17 25 Run a Catalyst application as a cgiscript.18 Run a Catalyst application as a CGI script. 26 19 27 =head1 AUTHOR 20 =head1 AUTHORS 28 21 29 Sebastian Riedel, C<sri@oook.de> 22 Catalyst Contributors, see Catalyst.pm 30 23 31 24 =head1 COPYRIGHT 32 25 33 34 This library is free software, you can redistribute it and/or modify 26 This library is free software. You can redistribute it and/or modify 35 27 it under the same terms as Perl itself. 36 28 37 29 =cut 30 -
trunk/LATMOS-Accounts-Web/script/latmos_accounts_web_create.pl
r94 r2162 1 #!/usr/bin/ perl -w1 #!/usr/bin/env perl 2 2 3 3 use strict; 4 4 use warnings; 5 use Getopt::Long;6 use Pod::Usage;7 use Catalyst::Helper;8 5 9 my $force = 0; 10 my $mech = 0; 11 my $help = 0; 12 13 GetOptions( 14 'nonew|force' => \$force, 15 'mech|mechanize' => \$mech, 16 'help|?' => \$help 17 ); 18 19 pod2usage(1) if ( $help || !$ARGV[0] ); 20 21 my $helper = Catalyst::Helper->new( { '.newfiles' => !$force, mech => $mech } ); 22 23 pod2usage(1) unless $helper->mk_component( 'LATMOS::Accounts::Web', @ARGV ); 6 use Catalyst::ScriptRunner; 7 Catalyst::ScriptRunner->run('LATMOS::Accounts::Web', 'Create'); 24 8 25 9 1; … … 34 18 35 19 Options: 36 - force don't create a .new file where a file to be created exists37 - mechanize use Test::WWW::Mechanize::Catalyst for tests if available38 - help display this help and exits20 --force don't create a .new file where a file to be created exists 21 --mechanize use Test::WWW::Mechanize::Catalyst for tests if available 22 --help display this help and exits 39 23 40 24 Examples: 41 25 latmos_accounts_web_create.pl controller My::Controller 42 latmos_accounts_web_create.pl - mechanize controller My::Controller26 latmos_accounts_web_create.pl --mechanize controller My::Controller 43 27 latmos_accounts_web_create.pl view My::View 44 latmos_accounts_web_create.pl view MyView TT 45 latmos_accounts_web_create.pl view TT TT 28 latmos_accounts_web_create.pl view HTML TT 46 29 latmos_accounts_web_create.pl model My::Model 47 30 latmos_accounts_web_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\ 48 31 dbi:SQLite:/tmp/my.db 49 32 latmos_accounts_web_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\ 50 dbi:Pg:dbname=foo root 4321 33 [Loader opts like db_schema, naming] dbi:Pg:dbname=foo root 4321 34 [connect_info opts like quote_char, name_sep] 51 35 52 36 See also: 53 37 perldoc Catalyst::Manual 54 38 perldoc Catalyst::Manual::Intro 39 perldoc Catalyst::Helper::Model::DBIC::Schema 40 perldoc Catalyst::Model::DBIC::Schema 41 perldoc Catalyst::View::TT 55 42 56 43 =head1 DESCRIPTION … … 62 49 This behavior can be suppressed with the C<-force> option. 63 50 64 =head1 AUTHOR 51 =head1 AUTHORS 65 52 66 Sebastian Riedel, C<sri@oook.de> 67 Maintained by the Catalyst Core Team. 53 Catalyst Contributors, see Catalyst.pm 68 54 69 55 =head1 COPYRIGHT 70 56 71 This library is free software , you can redistribute it and/or modify57 This library is free software. You can redistribute it and/or modify 72 58 it under the same terms as Perl itself. 73 59 -
trunk/LATMOS-Accounts-Web/script/latmos_accounts_web_fastcgi.pl
r94 r2162 1 #!/usr/bin/ perl -w1 #!/usr/bin/env perl 2 2 3 BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' } 4 5 use strict; 6 use warnings; 7 use Getopt::Long; 8 use Pod::Usage; 9 use FindBin; 10 use lib "$FindBin::Bin/../lib"; 11 use LATMOS::Accounts::Web; 12 13 my $help = 0; 14 my ( $listen, $nproc, $pidfile, $manager, $detach, $keep_stderr ); 15 16 GetOptions( 17 'help|?' => \$help, 18 'listen|l=s' => \$listen, 19 'nproc|n=i' => \$nproc, 20 'pidfile|p=s' => \$pidfile, 21 'manager|M=s' => \$manager, 22 'daemon|d' => \$detach, 23 'keeperr|e' => \$keep_stderr, 24 ); 25 26 pod2usage(1) if $help; 27 28 LATMOS::Accounts::Web->run( 29 $listen, 30 { nproc => $nproc, 31 pidfile => $pidfile, 32 manager => $manager, 33 detach => $detach, 34 keep_stderr => $keep_stderr, 35 } 36 ); 3 use Catalyst::ScriptRunner; 4 Catalyst::ScriptRunner->run('LATMOS::Accounts::Web', 'FastCGI'); 37 5 38 6 1; … … 45 13 46 14 latmos_accounts_web_fastcgi.pl [options] 47 15 48 16 Options: 49 -? - help display this help and exits50 -l - listen Socket path to listen on17 -? --help display this help and exit 18 -l --listen socket path to listen on 51 19 (defaults to standard input) 52 20 can be HOST:PORT, :PORT or a 53 21 filesystem path 54 -n - nprocspecify number of processes to keep22 -n --nproc specify number of processes to keep 55 23 to serve requests (defaults to 1, 56 requires - listen)57 -p - pidfilespecify filename for pid file58 (requires - listen)59 -d - daemon daemonize (requires-listen)60 -M - managerspecify alternate process manager24 requires --listen) 25 -p --pidfile specify filename for pid file 26 (requires --listen) 27 -d --daemon daemonize (requires --listen) 28 -M --manager specify alternate process manager 61 29 (FCGI::ProcManager sub-class) 62 30 or empty string to disable 63 -e - keeperrsend error messages to STDOUT, not31 -e --keeperr send error messages to STDOUT, not 64 32 to the webserver 33 --proc_title Set the process title (if possible) 65 34 66 35 =head1 DESCRIPTION 67 36 68 Run a Catalyst application as fastcgi.37 Run a Catalyst application as FastCGI. 69 38 70 =head1 AUTHOR 39 =head1 AUTHORS 71 40 72 Sebastian Riedel, C<sri@oook.de> 73 Maintained by the Catalyst Core Team. 41 Catalyst Contributors, see Catalyst.pm 74 42 75 43 =head1 COPYRIGHT 76 44 77 This library is free software , you can redistribute it and/or modify45 This library is free software. You can redistribute it and/or modify 78 46 it under the same terms as Perl itself. 79 47 -
trunk/LATMOS-Accounts-Web/script/latmos_accounts_web_server.pl
r1539 r2162 1 #!/usr/bin/ perl -w1 #!/usr/bin/env perl 2 2 3 BEGIN { 4 $ENV{CATALYST_ENGINE} ||= 'HTTP'; 5 $ENV{CATALYST_SCRIPT_GEN} = 30; 6 require Catalyst::Engine::HTTP; 7 } 8 9 use strict; 10 use warnings; 11 use Getopt::Long; 12 use Pod::Usage; 13 use FindBin; 14 use lib "$FindBin::Bin/../lib"; 15 16 my $debug = 0; 17 my $daemon = 0; 18 my $fork = 0; 19 my $help = 0; 20 my $host = undef; 21 my $port = 3000; 22 my $keepalive = 0; 23 my $restart = 0; 24 my $restart_delay = 1; 25 my $restart_regex = '\.yml$|\.yaml$|\.pm$'; 26 my $restart_directory = undef; 27 my $forcehttps = 0; 28 29 my @argv = @ARGV; 30 31 GetOptions( 32 'debug|d' => \$debug, 33 'fork' => \$fork, 34 'daemon' => \$daemon, 35 'help|?' => \$help, 36 'host=s' => \$host, 37 'port=s' => \$port, 38 'keepalive|k' => \$keepalive, 39 'restart|r' => \$restart, 40 'restartdelay|rd=s' => \$restart_delay, 41 'restartregex|rr=s' => \$restart_regex, 42 'restartdirectory=s' => \$restart_directory, 43 'forcehttps' => \$forcehttps, 44 ); 45 46 pod2usage(1) if $help; 47 48 if ( $restart ) { 49 $ENV{CATALYST_ENGINE} = 'HTTP::Restarter'; 50 } 51 if ( $debug ) { 52 $ENV{CATALYST_DEBUG} = 1; 53 } 54 if ( $forcehttps ) { 55 $ENV{HTTPS} = 'ON'; 3 BEGIN { 4 $ENV{CATALYST_SCRIPT_GEN} = 40; 56 5 } 57 6 58 if ($daemon) { 59 require POSIX; 60 my $childpid = fork; 61 if ($childpid) { 62 exit(0); 63 } 64 # child now 65 open STDIN, "+</dev/null" or die $!; 66 open STDOUT, ">&STDIN" or die $!; 67 open STDERR, ">&STDIN" or die $!; 68 } 69 70 # This is require instead of use so that the above environment 71 # variables can be set at runtime. 72 require LATMOS::Accounts::Web; 73 74 LATMOS::Accounts::Web->run( $port, $host, { 75 argv => \@argv, 76 'fork' => $fork, 77 keepalive => $keepalive, 78 restart => $restart, 79 restart_delay => $restart_delay, 80 restart_regex => qr/$restart_regex/, 81 restart_directory => $restart_directory, 82 } ); 7 use Catalyst::ScriptRunner; 8 Catalyst::ScriptRunner->run('LATMOS::Accounts::Web', 'Server'); 83 9 84 10 1; … … 86 12 =head1 NAME 87 13 88 latmos_accounts_web_server.pl - Catalyst Test server14 latmos_accounts_web_server.pl - Catalyst Test Server 89 15 90 16 =head1 SYNOPSIS … … 92 18 latmos_accounts_web_server.pl [options] 93 19 94 Options: 95 -d -debug force debug mode 96 -f -fork handle each request in a new process 97 (defaults to false) 98 -? -help display this help and exits 99 -host host (defaults to all) 100 -p -port port (defaults to 3000) 101 -k -keepalive enable keep-alive connections 102 -r -restart restart when files get modified 103 (defaults to false) 104 -rd -restartdelay delay between file checks 105 -rr -restartregex regex match files that trigger 106 a restart when modified 107 (defaults to '\.yml$|\.yaml$|\.pm$') 108 -restartdirectory the directory to search for 109 modified files 110 (defaults to '../') 111 -forcehttps force url to https 20 -d --debug force debug mode 21 -f --fork handle each request in a new process 22 (defaults to false) 23 -? --help display this help and exits 24 -h --host host (defaults to all) 25 -p --port port (defaults to 3000) 26 -k --keepalive enable keep-alive connections 27 -r --restart restart when files get modified 28 (defaults to false) 29 -rd --restart_delay delay between file checks 30 (ignored if you have Linux::Inotify2 installed) 31 -rr --restart_regex regex match files that trigger 32 a restart when modified 33 (defaults to '\.yml$|\.yaml$|\.conf|\.pm$') 34 --restart_directory the directory to search for 35 modified files, can be set multiple times 36 (defaults to '[SCRIPT_DIR]/..') 37 --follow_symlinks follow symlinks in search directories 38 (defaults to false. this is a no-op on Win32) 39 --background run the process in the background 40 --pidfile specify filename for pid file 112 41 113 42 See also: … … 119 48 Run a Catalyst Testserver for this application. 120 49 121 =head1 AUTHOR 50 =head1 AUTHORS 122 51 123 Sebastian Riedel, C<sri@oook.de> 124 Maintained by the Catalyst Core Team. 52 Catalyst Contributors, see Catalyst.pm 125 53 126 54 =head1 COPYRIGHT 127 55 128 This library is free software , you can redistribute it and/or modify56 This library is free software. You can redistribute it and/or modify 129 57 it under the same terms as Perl itself. 130 58 131 59 =cut 60 -
trunk/LATMOS-Accounts-Web/script/latmos_accounts_web_test.pl
r94 r2162 1 #!/usr/bin/ perl -w1 #!/usr/bin/env perl 2 2 3 use strict; 4 use warnings; 5 use Getopt::Long; 6 use Pod::Usage; 7 use FindBin; 8 use lib "$FindBin::Bin/../lib"; 9 use Catalyst::Test 'LATMOS::Accounts::Web'; 10 11 my $help = 0; 12 13 GetOptions( 'help|?' => \$help ); 14 15 pod2usage(1) if ( $help || !$ARGV[0] ); 16 17 print request($ARGV[0])->content . "\n"; 3 use Catalyst::ScriptRunner; 4 Catalyst::ScriptRunner->run('LATMOS::Accounts::Web', 'Test'); 18 5 19 6 1; … … 28 15 29 16 Options: 30 - help display this help and exits17 --help display this help and exits 31 18 32 19 Examples: … … 42 29 Run a Catalyst action from the command line. 43 30 44 =head1 AUTHOR 31 =head1 AUTHORS 45 32 46 Sebastian Riedel, C<sri@oook.de> 47 Maintained by the Catalyst Core Team. 33 Catalyst Contributors, see Catalyst.pm 48 34 49 35 =head1 COPYRIGHT 50 36 51 This library is free software , you can redistribute it and/or modify37 This library is free software. You can redistribute it and/or modify 52 38 it under the same terms as Perl itself. 53 39 -
trunk/LATMOS-Accounts/etc/sysconfig/latmos-accounts
r608 r2162 1 1 # The user server must run as 2 USER= nobody2 USER=laccounts 3 3 4 4 # The listener port -
trunk/LATMOS-Accounts/latmos-accounts.spec.in
r2134 r2162 79 79 install -m 644 etc/cron.d/latmos-accounts %buildroot/%_sysconfdir/cron.d/latmos-accounts 80 80 81 mkdir -p %buildroot%{_localstatedir}/lib/latmos-accounts 82 81 83 %clean 82 84 rm -rf %buildroot 85 86 %pre 87 %_pre_useradd laccounts %{_localstatedir}/lib/latmos-accounts /bin/bash 83 88 84 89 %preun … … 99 104 %attr(0600,laccounts,laccounts) %config(noreplace) %_sysconfdir/latmos-accounts/* 100 105 %_bindir/* 101 %{_mandir}/man1/* 102 %{_mandir}/man3/* 103 %{_mandir}/man5/* 104 %{_mandir}/man8/* 106 %{_mandir}/man?/* 105 107 %perl_vendorlib/* 106 108 %_datadir/latmos-accounts 107 109 %_datadir/locale/* 110 %attr(0600,laccounts,laccounts) %{_localstatedir}/lib/latmos-accounts -
trunk/LATMOS-Accounts/lib/LATMOS/Accounts.pm
r2157 r2162 12 12 use LATMOS::Accounts::I18N; 13 13 14 our $VERSION = '5.2.3 1';14 our $VERSION = '5.2.33'; 15 15 16 16 =head1 NAME
Note: See TracChangeset
for help on using the changeset viewer.