{"id":21023447,"url":"https://github.com/quasarapp/patronum","last_synced_at":"2026-02-27T17:40:59.898Z","repository":{"id":46725158,"uuid":"256445004","full_name":"QuasarApp/Patronum","owner":"QuasarApp","description":"This is extension libraries for control your daemons.","archived":false,"fork":false,"pushed_at":"2025-09-16T17:49:53.000Z","size":2615,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-09-16T20:11:28.986Z","etag":null,"topics":["controller","cpp","deamon","qt","services"],"latest_commit_sha":null,"homepage":"https://quasarapp.ddns.net:3031/docs/QuasarApp/Patronum/latest/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QuasarApp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-17T08:23:57.000Z","updated_at":"2025-09-16T17:49:56.000Z","dependencies_parsed_at":"2023-01-31T18:46:39.325Z","dependency_job_id":"92c10ef7-f8b2-4460-9bb1-5b541ff53914","html_url":"https://github.com/QuasarApp/Patronum","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/QuasarApp/Patronum","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuasarApp%2FPatronum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuasarApp%2FPatronum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuasarApp%2FPatronum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuasarApp%2FPatronum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QuasarApp","download_url":"https://codeload.github.com/QuasarApp/Patronum/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuasarApp%2FPatronum/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29906562,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T17:28:36.873Z","status":"ssl_error","status_checked_at":"2026-02-27T17:28:20.970Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["controller","cpp","deamon","qt","services"],"created_at":"2024-11-19T11:18:11.762Z","updated_at":"2026-02-27T17:40:59.876Z","avatar_url":"https://github.com/QuasarApp.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Patronum\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"res/Banner_web.jpg\" alt=\"Credits\"\u003e\u003c/p\u003e\n\nThis is extension libraries for control your daemons and rervices. This library will save you the time you spend building and deploying server daemons or services. \n\nIf you want to get more inforamtion about library see our [documentation](https://quasarapp.ddns.net:3031/docs/QuasarApp/Patronum/latest/)\n\n### Why is Patronum?\n\nBecouse This library offers easy interface to control your demons likewise the magic of Harry Potter controls dementors\n\n## Main features\n\n* Support linux systemd daemons.\n* Deploy and install your services on the host.\n* Auto create a Service from your server or yor daemon utility.\n* Auto create a Controller of your Service. \n\n## Deffault sopprted commands\n\n* install - deploys your daemon into your host system.  This command deploy service for root user if you want to deploy service for specify user just use   **-install \u003cUserName\u003e** command (root right required)\n* unistall - removes old deployed daemon. (root right required)\n* start - starts your service\n* stop - stops ypur service\n* pause - sends pause command to your daemon\n* upause (resume) - sends resume coomand to your daemon\n\n\n## Include\n\n### For cmake projects\n \n * cd yourRepo\n * git submodule add https://github.com/QuasarApp/Patronum.git # add the repository of Patronum into your repo like submodule\n * git submodule update --init --recursive\n * Include in your CMakeLists.txt file the main CMakeLists.txt file of Patronum library\n  ```cmake\n    add_subdirectory(Patronum)\n  ```\n * Rebuild yuor project\n\n\n## Usage\n\n### Service\n\n```cpp\n#include \u003cpatronum.h\u003e\n\nclass MyserviceApp : public Patronum::Service\u003cQCoreApplication\u003e\n{\n\npublic:\n    MyserviceApp(int argc, char **argv):\n        Patronum::Service\u003cQCoreApplication\u003e(argc, argv) {\n\n    }\n\n    bool onStart() override {\n        // call on server started\n        return true;\n    }\n\n    void onStop() override {\n        // call on server stoped \n    }\n\n    bool handleReceive(const Patronum::Feature \u0026data) override {\n    \n        if (data.cmd() == \"ping\") {\n            sendResuylt(\"Pong\");\n        } else if (data.cmd() == \"state\") {\n            sendResuylt(\"application status\");\n        } \n\n        return true;\n    }\n\n\n    QSet\u003cPatronum::Feature\u003e supportedFeatures() override {\n        QSet\u003cPatronum::Feature\u003e data;\n\n        data \u003c\u003c Patronum::Feature(\"ping\", \"This is description of the ping command\");\n        data \u003c\u003c Patronum::Feature(\"state\", \"return state\");\n\n        return data;\n    }\n};\n\n\nint main(int argc, char **argv) {\n    QCoreApplication::setApplicationName(\"MyServiceName\"); // \u003c--\n    QCoreApplication::setOrganizationName(\"MyCompany\"); // \u003c--\n    MyserviceApp app;\n    return app.exec();\n}\n```\n\n### Controller\nDy default the service can works as acontroller, But some times we need to create a simple controller app for exists our service. \nFor example universal controller for all services of your comapny. The all services that based on Patronum library compatible with each other due to the fact that the command configuration is on the side of the service itself, and not the controller.\n\n\n```cpp\n#include \u003cpatronum.h\u003e\n\nclass MyControllerApp : public Patronum::Controller\n{\npublic:\n\n    MyControllerApp():\n        Patronum::Controller() {\n\n    }\n};\n\nint main(int argc, char **argv) {\n    QCoreApplication::setApplicationName(\"MyServiceName\"); // \u003c--\n    QCoreApplication::setOrganizationName(\"MyCompany\"); // \u003c--\n    QCoreApplcication app\n    MyControllerApp controller;\n    controller.send(argc, argv);\n    return app.exec();\n}\n```\n\n\n### Wrapers of the service distributions\n\nThe Service class use own executable like a main path to service executable. \nIf your application has custom dependencies and do not work without costom envirement then you need to add **P_RUN_FILE** or **CQT_RUN_FILE** variavle with full path into the your wraper or launcher file.\n\n#### Order of the search executable file of the service\n\n1. **P_RUN_FILE** variable\n2. **CQT_RUN_FILE** variable\n3. Absalute path to executable.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquasarapp%2Fpatronum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquasarapp%2Fpatronum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquasarapp%2Fpatronum/lists"}