]> bicyclesonthemoon.info Git - ott/bsta/blobdiff - attach.1.pl
Adapted for new config tool.
[ott/bsta] / attach.1.pl
index da38af8ff770610d61df696c6c44f5df4208f22e..91fed4cc41a8a36b2c75d8f71c78307661030387 100644 (file)
@@ -1,35 +1,34 @@
-###PERL;
-#
+###RUN_PERL: #!/usr/bin/perl
+
 # /bsta/a
 # attach.pl is generated from attach.1.pl.
-# 19.10.2016
 #
 # The attachment interface
 #
-#    Copyright (C) 2016  Balthasar SzczepaƱski
+# Copyright (C) 2016, 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);
 
-###SETTINGS_PATH;
-###DATA_PATH;
-###STATE_PATH;
+###PERL_DATA_PATH:          DATA_PATH          = /botm/data/bsta
+###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;
@@ -53,7 +52,7 @@ my $filepath;
 my $direct;
 
 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;
@@ -97,8 +96,8 @@ else {
        $password='';
 }
 
-%settings=readdatafile(SETTINGS_PATH);
-%state=readdatafile(STATE_PATH);
+%settings=readdatafile(DATA_SETTINGS_PATH);
+%state=readdatafile(DATA_STATE_PATH);
 %filedata=readdatafile(DATA_PATH.'a'.$ID);
 if ($filedata{'frame'} ne '') {
        $frame=int($filedata{'frame'});