GeoHelm/postgis/crunchy_ctl.cgi

27 lines
516 B
Plaintext
Raw Normal View History

2024-01-27 19:04:46 +00:00
#!/usr/bin/perl
require './geohelm-lib.pl';
&ReadParse();
&error_setup($text{'stop_err'});
my $svc = 'none';
my $ctl = 'none';
if($in{'app_pg_tileserv'}){ #Tile
$svc = 'pg_tileserv';
$ctl = $in{'app_pg_tileserv'};
}elsif($in{'app_pg_featureserv'}){ #Feature
$svc = 'pg_featureserv';
$ctl = $in{'app_pg_featureserv'};
}
my $cmd_out = "";
my $cmd_err = "";
my $out = &execute_command("/bin/systemctl $ctl $svc", undef, \$cmd_out, \$cmd_err, 0, 0);
if($cmd_err ne ""){
&error($cmd_err)
}
&redirect("");