sfnix / upstart_monitor
该软件包已被废弃,不再维护。未建议替代软件包。
基于 Symfony 的 sfnix/upstart 绑定的 Web UI。 (无痛苦 Upstart 配置。它可以帮助任何脚本在 Linux 上永远在后台运行。)
1.0.5
2018-03-03 01:26 UTC
Requires
Suggests
- ext-mcrypt: *
- ext-openssl: *
This package is not auto-updated.
Last update: 2023-02-04 16:40:48 UTC
README
基于 Symfony 的 sfnix/upstart 绑定的 Web UI。它可以帮助任何 symfony 命令(或任何其他脚本)在后台永久运行并在失败时重启。## 安装 使用 composer 安装该软件包及其依赖项
$ composer require sfnix/upstart_monitor
检查 openssl(推荐)或 mcrypt PHP 扩展。
$ php -i | grep -e "openssl" -e "mcrypt"
注册软件包
// app/AppKernel.php public function registerBundles() { //... $bundles = [ //... new SfNix\UpstartBundle\UpstartBundle(), new SfNix\UpstartMonitorBundle\UpstartMonitorBundle(), ]; //... }
# app/config/routing.yml upstart_monitor: resource: "@UpstartMonitorBundle/Resources/config/routing.yml" prefix: /upstart
# app/config/security.yml security: #... access_control: upstart: { path: ^/upstart, roles: ROLE_ADMIN }
# app/config/config.yml imports: # ... - { resource: upstart.yml }
# app/config/upstart.yml upstart_monitor: #WebSocket server to start. server: host: 0.0.0.0 port: 13000 #WebSocket client. client: schema: 'ws' port: 13000 path: / upstart: #... job: monitor: command: upstart:monitor verbose: 1 native: {respawn: true, setuid: root, manual: true} #...
有关 upstart 配置,请参阅 sfnix/upstart。
$ ./app/console upstart:install $ ./app/console upstart:start monitor
您可以在 http://{your.domain}/upstart 访问。## 注意 UpstartMonitorBundle 的 upstart:monitor 命令必须以超级用户权限运行,才能启动/停止任务,所以请小心!UpstartMonitorBundle 绝对不提供任何担保,使用风险自担。