mirror of
https://github.com/ManfredAabye/opensimMULTITOOLS-II.git
synced 2026-07-29 18:29:45 +00:00
OSMTool Web PHP (DE/EN/FR/ES)
This folder contains a complete PHP web interface for osmtool_main.sh.
Features
- Login-protected web UI
- Language switch:
de,en,fr,es - CSRF protection
- Session-based execution history
- Live status cards for screen sessions, ports and latest artifacts
- Command preview and output viewer
- External CSS and JavaScript assets
- Whitelisted module/action execution only
- Runner script wrapper for safer command execution
- Configurable timeout for long-running commands
File Layout
public/index.php- web UI and request handlingpublic/style.css- layout and visual designpublic/app.js- client-side form switching for modules and actionssrc/web_init.php- session, auth helpers, CSRFsrc/i18n.php- translationssrc/runner.php- module catalog, command whitelist and executionsrc/config.sample.php- configuration templatebin/osmtool_web_runner.sh- controlled bridge toosmtool_main.sh
Setup
- Typical Linux deploy path:
sudo mkdir -p /var/www/html/osmtool-web
sudo cp -a webphp/. /var/www/html/osmtool-web/
sudo chown -R www-data:www-data /var/www/html/osmtool-web
- Edit config values:
nano /var/www/html/osmtool-web/src/config.php
- Set execute bit for runner and main script:
chmod +x /var/www/html/osmtool-web/bin/osmtool_web_runner.sh
chmod +x /opt/opensimMULTITOOLS-II/osmtool_main.sh
- Configure web server document root to:
/var/www/html/osmtool-web/public
- Open in browser and log in with
web_passwordfrom config.
Sudoers Example (recommended)
Use visudo and allow only the web runner:
www-data ALL=(manni) NOPASSWD: /var/www/html/osmtool-web/bin/osmtool_web_runner.sh
Then keep use_sudo=true and sudo_user=manni in config.
Supported Modules
installstartstopcleanuphealthbackuprestoreupdateconfigreportsmokecron
Notes On Scope
- The web interface now exposes the modular command set instead of only a few shortcut actions.
- Visible form fields change automatically depending on the selected module and action.
- Sensitive values such as passwords and secrets are masked in the command preview.
- Timeout handling uses
command_timeout_secondsfromsrc/config.phporsrc/config.sample.php. - Live status cards can be tuned with
status_portsandstatus_screensinsrc/config.php.
Notes
- Do not expose this UI publicly without HTTPS and IP restrictions.
- Keep the password strong and unique.
- Extend modules or actions in
src/runner.phpandbin/osmtool_web_runner.shtogether.