-###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;
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;
$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'});