]> bicyclesonthemoon.info Git - ott/bsta/blobdiff - info.1.pl
Adapted for new config tool.
[ott/bsta] / info.1.pl
index 8e16798dbc8109a590f3476c2c02cc8a37e721bb..87720052ab5cf8ff06f1cb2360e6367b0d2356ec 100644 (file)
--- a/info.1.pl
+++ b/info.1.pl
@@ -1,37 +1,36 @@
-###PERL;
-#
+###RUN_PERL: #!/usr/bin/perl
+
 # /bsta/i
 # info.pl is generated from info.1.pl.
-# 05.06.2017
 #
 # The frame/story info interface
 #
-#    Copyright (C) 2017  Balthasar Szczepański
+# Copyright (C) 2017, 2023  Balthasar Szczepański
 #
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU Affero General Public License as
-#    published by the Free Software Foundation, either version 3 of the
-#    License, or (at your option) any later version.
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
 #
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU Affero General Public License for more details.
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Affero General Public License for more details.
 #
-#    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# You should have received a copy of the GNU Affero General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 use strict;
 #use warnings;
-###LIB;
+###PERL_LIB: use lib /botm/lib/bsta
 use bsta_lib qw(failpage gethttpheader getcgi readdatafile printdatafile);
 use File::Copy;
 
-###DATA_PATH;
-###DEFAULT_PATH;
-###SETTINGS_PATH;
-###STATE_PATH;
-###NOACCESS_PATH;
+###PERL_DATA_PATH:          DATA_PATH          = /botm/data/bsta
+###PERL_DATA_DEFAULT_PATH:  DATA_DEFAULT_PATH  = /botm/data/bsta/default
+###PERL_DATA_NOACCESS_PATH: DATA_NOACCESS_PATH = /botm/data/bsta/noaccess
+###PERL_DATA_SETTINGS_PATH: DATA_SETTINGS_PATH = /botm/data/bsta/settings
+###PERL_DATA_STATE_PATH:    DATA_STATE_PATH    = /botm/data/bsta/state
 
 my %http;
 my %cgi;
@@ -54,7 +53,7 @@ my $ongtime;
 my $seconds;
 
 delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
-###PATH;
+###PERL_SET_PATH: $ENV{'PATH'} = /usr/local/bin:/usr/bin:/bin;
 
 if ($ENV{'REQUEST_METHOD'} =~ /^(HEAD|GET|POST)$/) {
        $method=$1;
@@ -96,10 +95,10 @@ else {
        $password='';
 }
 
-%settings=readdatafile(SETTINGS_PATH);
-%default=readdatafile(DEFAULT_PATH);
+%settings=readdatafile(DATA_SETTINGS_PATH);
+%default=readdatafile(DATA_DEFAULT_PATH);
 %framedata=readdatafile(DATA_PATH.$frame);
-%state=readdatafile(STATE_PATH);
+%state=readdatafile(DATA_STATE_PATH);
 if($password eq $settings{'password'}){
        $passwordOK = 1;
 }
@@ -159,7 +158,7 @@ else {
        }
        else {
                $access=0;
-               %framedata = readdatafile(NOACCESS_PATH);
+               %framedata = readdatafile(DATA_NOACCESS_PATH);
                foreach my $ind (keys %default) {
                        unless(defined($framedata{$ind})){
                                $framedata{$ind}=$default{$ind};