Download the PHP package tourze/server-shell-bundle without Composer
On this page you can find all versions of the php package tourze/server-shell-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package server-shell-bundle
Server Shell Bundle
中文
A powerful Symfony bundle for managing and executing shell scripts on remote servers. This bundle provides a comprehensive system for creating, managing, and executing shell scripts across multiple nodes with full execution tracking and asynchronous processing support.
Table of Contents
- Features
- Installation
- Configuration
- Quick Start
- API Reference
- Advanced Usage
- Admin Interface
- Security Considerations
- Dependencies
- Contributing
- License
Features
- Script Management: Create, update, and manage shell scripts with metadata
- Remote Execution: Execute scripts on remote nodes via SSH
- Execution Tracking: Track script execution status, results, and performance metrics
- Asynchronous Processing: Support for async script execution using Symfony Messenger
- Security: Configurable sudo execution and script validation
- EasyAdmin Integration: Built-in admin interface for script management
- History & Logging: Complete execution history with detailed logging
- Flexible Configuration: Configurable working directories, timeouts, and execution parameters
- Tag-based Organization: Organize scripts with tags for easy categorization
Installation
Configuration
Bundle Registration
Register the bundle in your config/bundles.php:
Database Setup
Run migrations to create the required database tables:
Script Parameters
- name: Human-readable script name
- content: Shell script content
- workingDirectory: Directory to execute the script in (default: /tmp)
- useSudo: Whether to execute with sudo privileges (default: false)
- timeout: Execution timeout in seconds (default: 300)
- tags: Array of tags for organization
- description: Script description
- enabled: Whether the script is enabled for execution (default: true)
Execution Tracking
Each script execution creates a ScriptExecution entity that tracks:
- Execution status (PENDING, RUNNING, COMPLETED, FAILED, TIMEOUT, CANCELED)
- Execution results and output
- Execution time and performance metrics
- Associated node and script information
- Exit codes and error information
Quick Start
Basic Usage
Asynchronous Execution
API Reference
ShellScriptService
The main service for script management:
Entities
- ShellScript: Represents a shell script with metadata
- ScriptExecution: Tracks individual script executions
- CommandStatus: Enum for execution status values
Advanced Usage
Batch Script Execution
Custom Script Templates
Execution Monitoring
Admin Interface
The bundle provides EasyAdmin controllers for managing scripts and viewing execution history:
- ShellScriptCrudController: Manage shell scripts
- ScriptExecutionCrudController: View execution history and results
Security Considerations
- Scripts are temporarily stored in
/tmp/shell_scriptswith restricted permissions (0700) - Remote script files are automatically cleaned up after execution
- Sudo execution is configurable per script
- All executions are logged for audit purposes
Dependencies
This bundle depends on:
tourze/server-node-bundle: For remote node managementtourze/server-command-bundle: For remote command executionsymfony/messenger: For asynchronous processingeasycorp/easyadmin-bundle: For admin interface
Contributing
Please see CONTRIBUTING.md for details.
License
The MIT License (MIT). Please see License File for more information.
All versions of server-shell-bundle with dependencies
doctrine/data-fixtures Version ^2.0
doctrine/dbal Version ^4.0
doctrine/doctrine-bundle Version ^2.13
doctrine/doctrine-fixtures-bundle Version ^4.0
doctrine/orm Version ^3.0
doctrine/persistence Version ^4.1
easycorp/easyadmin-bundle Version ^4
knplabs/knp-menu Version ^3.7
monolog/monolog Version ^3.1
phpunit/php-timer Version ^7.0
psr/log Version ^3|^2|^1
symfony/config Version ^7.3
symfony/console Version ^7.3
symfony/dependency-injection Version ^7.3
symfony/doctrine-bridge Version ^7.3
symfony/filesystem Version ^7.3
symfony/form Version ^7.3
symfony/framework-bundle Version ^7.3
symfony/http-foundation Version ^7.3
symfony/http-kernel Version ^7.3
symfony/messenger Version ^7.3
symfony/property-access Version ^7.3
symfony/yaml Version ^7.3
tourze/bundle-dependency Version 1.*
tourze/doctrine-timestamp-bundle Version 1.1.*
tourze/doctrine-track-bundle Version 1.1.*
tourze/doctrine-user-bundle Version 1.0.*
tourze/easy-admin-menu-bundle Version 1.0.*
tourze/enum-extra Version 1.0.*
tourze/server-command-bundle Version 1.0.*
tourze/server-node-bundle Version 1.0.*
tourze/symfony-dependency-service-loader Version 1.0.*