{"id":16731628,"url":"https://github.com/missinglink/supervisord","last_synced_at":"2025-04-10T11:24:02.593Z","repository":{"id":3959565,"uuid":"5053191","full_name":"missinglink/supervisord","owner":"missinglink","description":"PHP frontend for Supervisord daemon manager","archived":false,"fork":false,"pushed_at":"2013-05-03T20:56:40.000Z","size":308,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T10:11:23.356Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/missinglink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-07-15T03:18:47.000Z","updated_at":"2016-08-24T18:59:54.000Z","dependencies_parsed_at":"2022-09-03T10:50:12.104Z","dependency_job_id":null,"html_url":"https://github.com/missinglink/supervisord","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Fsupervisord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Fsupervisord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Fsupervisord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/missinglink%2Fsupervisord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/missinglink","download_url":"https://codeload.github.com/missinglink/supervisord/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248208612,"owners_count":21065203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-12T23:38:13.540Z","updated_at":"2025-04-10T11:24:02.570Z","avatar_url":"https://github.com/missinglink.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"PHP front-end for Supervisor daemon manager\n========================================================================\n\nThis library provides a basic PHP interface to connect to a running Supervisor server via a TCP or UNIX socket.\n\nSupervisor allows you to manage daemon processes, you can:\n-   Group Processes\n-   Start + Stop Processes \u0026 Process Groups\n-   Tail stdout and stderr\n-   Send stdin\n-   Read process logs\n\nThe PHP API matches the Supervisor XML-RPC API as closely as possible and therefore\nis not the ideal PHP interface for process management.\n\n\nFeel free to extend, or build higher level abstractions on top of this library.\n\nInstall\n--------\n\n```bash\nsh install.sh\n```\n\nExample Usage\n-------------\n\n```php\nuse \\Supervisord\\Connection\\Stream;\nuse \\Supervisord\\Connection\\StreamConnection;\nuse \\Supervisord\\Connection\\StreamException;\n\n/** @see example.php */\n\n// Connect to server\ntry {\n    $stream = new Stream( '127.0.0.1:9900' );\n    $connection = new StreamConnection( $stream );\n}\n\n// Connection Error\ncatch( StreamException $e ) {\n    die( \"Can't connect to server at 127.0.0.1:9900\\n\" );\n}\n\n// Create client\n$client = new Client( $connection );\n\n// Add a group\n$client-\u003eaddGroup( 'log', 999 );\n\n// Create a new process\n$client-\u003eaddProgramToGroup( 'log', 'syslog01', array(\n    'command' =\u003e 'tail -f /var/log/syslog',\n    'autostart' =\u003e 'false',\n    'autorestart' =\u003e 'true',\n    'startsecs' =\u003e 1,\n));\n\n// Start the process\n$client-\u003estartProcess( 'log:syslog01', 'false' );\n\n// Start the whole group\n$client-\u003estartProcessGroup( 'log', 'false' );\n\n// Output single process info\nprintf( \"Single Process:\\n%s\\n\", print_r( $client-\u003egetProcessInfo( 'log:syslog01' ), true ) );\n\n// Output process stdout\nprintf( \"StdOut:\\n%s\\n\", print_r( $client-\u003etailProcessStdoutLog( 'log:syslog01', 0, 1024 ), true ) );\n\n// Output process stderr\nprintf( \"StdErr:\\n%s\\n\", print_r( $client-\u003etailProcessStderrLog( 'log:syslog01', 0, 1024 ), true ) );\n\n// Send process stdin\n$client-\u003esendProcessStdin( 'log:syslog01', 'hello world!' );\n\n// Stop the process\n$client-\u003estopProcess( 'log:syslog01', 'false' );\n\n// Stop the whole group\n$client-\u003estopProcessGroup( 'log', 'false' );\n\n// Add a group\n$client-\u003eremoveProcessGroup( 'log' );\n\n// Reset server\n$client-\u003ereloadConfig();\n```\n\nTests\n--------\n\n```bash\nphpunit\n```\n\nTravis CI\n---------\n\n![travis-ci](http://cdn-ak.favicon.st-hatena.com/?url=http%3A%2F%2Fabout.travis-ci.org%2F)\u0026nbsp;http://travis-ci.org/#!/missinglink/supervisord\n\n![travis-ci](https://secure.travis-ci.org/missinglink/supervisord.png?branch=master)\n\nRegenerate the client library after installing RPC extensions\n-------------------------------------------------------------\n\n```bash\nphp reflect.php\n```\n\nLicense\n------------------------\n\nReleased under the MIT(Poetic) Software license\n\n    This work 'as-is' we provide.\n    No warranty express or implied.\n    Therefore, no claim on us will abide.\n    Liability for damages denied.\n\n    Permission is granted hereby,\n    to copy, share, and modify.\n    Use as is fit,\n    free or for profit.\n    These rights, on this notice, rely.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmissinglink%2Fsupervisord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmissinglink%2Fsupervisord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmissinglink%2Fsupervisord/lists"}