#!/usr/bin/perl require './geohelm-lib.pl'; require './pg-lib.pl'; require '../webmin/webmin-lib.pl'; #for OS detection # Check if config file exists if (! -r $config{'postgis_config'}) { &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1); print &text('index_econfig', "$config{'postgis_config'}", "$gconfig{'webprefix'}/config.cgi?$module_name"),"
\n"; &ui_print_footer("/", $text{"index"}); exit; } if(-f "$module_root_directory/setup.cgi"){ &redirect('setup.cgi'); } &ui_print_header("PostGIS Webmin Module by Cited, Inc. 2023 ", $text{'index_title'}, "", "intro", 1, 1, 0, &help_search_link("GIS", "Postgre", "postgis", )); push(@links, "pg_install.cgi"); push(@titles, $text{'pg_inst_title'}); push(@icons, "images/pg.png"); push(@links, "edit_pg_ext.cgi"); push(@titles, $text{'pg_ext_title'}); push(@icons, "images/postgis.png"); push(@links, "add_shape.cgi"); push(@titles, $text{'add_shape_title'}); push(@icons, "images/shp2pgsql.png"); push(@links, "add_raster.cgi"); push(@titles, $text{'add_raster_title'}); push(@icons, "images/raster2pgsql.png"); push(@links, "add_osm.cgi"); push(@titles, $text{'add_osm_title'}); push(@icons, "images/osm2pgsql.png"); push(@links, "edit_snapshots.cgi?mode=clone"); push(@titles, 'Clone'); push(@icons, "images/clone-database.png"); push(@links, "edit_snapshots.cgi?mode=create"); push(@titles, 'Snapshots'); push(@icons, "images/take-snapshot.png"); push(@links, "edit_snapshots.cgi?mode=restore"); push(@titles, 'Restore'); push(@icons, "images/restore-snapshot.png"); push(@links, "docs.cgi"); push(@titles, 'Docs'); push(@icons, "images/docs.png"); &icons_table(\@links, \@titles, \@icons, 4); if( -d '/opt/pg_tileserv'){ print &ui_buttons_start(); if (app_is_running('pg_tileserv') == 1) { print "pg_tileserv"; print &ui_buttons_row("crunchy_ctl.cgi", $text{'index_stop'}, $text{'index_stopmsg'}, ''); print &ui_buttons_row("crunchy_ctl.cgi", $text{'index_restart'}, $text{"index_restartmsg"}, ''); }else { print "PG TileServ is stopped."; print &ui_buttons_row("crunchy_ctl.cgi", $text{'index_start'}, $text{'index_startmsg'}, ''); } &ui_buttons_end(); } if( -d '/opt/pg_featureserv'){ print &ui_hr().&ui_buttons_start(); print &ui_hr(); if (app_is_running('pg_featureserv') == 1) { print "pg_featureserv"; print &ui_buttons_row("crunchy_ctl.cgi", $text{'index_stop'}, $text{'index_stopmsg_fs'}, ''); print &ui_buttons_row("crunchy_ctl.cgi", $text{'index_restart'}, $text{'index_restartmsg_fs'}, ''); }else { print "PG FeatureServ is stopped."; print &ui_buttons_row("crunchy_ctl.cgi", $text{'index_start'}, $text{'index_startmsg_fs'}, ''); } &ui_buttons_end(); } &ui_print_footer("/", $text{"index_return"});