{ "info": { "author": "\u00d3scar Garc\u00eda Amor", "author_email": "ogarcia@connectical.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Framework :: Bottle", "Intended Audience :: End Users/Desktop", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Natural Language :: English", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3", "Topic :: System", "Topic :: Utilities" ], "description": "# sysdweb\nControl systemd services through Web or REST API\n\n## Installation\n\n### From source\n\n```sh\ngit clone https://github.com/ogarcia/sysdweb.git\nvirtualenv3 ./sysdweb-venv\nsource ./sysdweb-venv/bin/activate\ncd sysdweb\npip install -r requirements.txt\npython setup.py install\n```\n\n### From pypi\n\n```sh\nvirtualenv3 ./sysdweb-venv\nsource ./sysdweb-venv/bin/activate\npip install sysdweb\n```\n\n### For Arch Linux users\n\nArch Linux users can install sysdweb from [AUR][1].\n\n## Run\n\nFirst take a look to `sysdweb.conf` file to configure sysdweb. Is self\nexplanatory.\n\nYou can place `sysdweb.conf` in `/etc` for system, in user home\n`~/.config/sysdweb/sysdweb.conf` or in same directory where you run sysdweb.\n\nOnce you have configured sysdweb, simply run.\n\n```\nsysdweb\n```\n\nBy default sysdweb listen in 10080 port to 127.0.0.1, you can change listen\nport and address with `-p` and `-l` or via environment variables.\n\n```sh\nsysdweb -p 9080 -l 0.0.0.0\n```\n\nCurrent config environment variables are the following.\n\n| Variable | Description |\n| --- | --- |\n| `SYSDWEB_CONFIG` | Config file location |\n| `SYSDWEB_HOST` | Listen address |\n| `SYSDWEB_PORT` | Listen port |\n| `SYSDWEB_LOGLEVEL` | Log level, effective values are `WARNING`, `INFO` and `DEBUG` |\n\n## API\n\nYou can control configured services via REST API, for example, with curl.\n\nThe API endpoint is `/api/v1//`, always `GET` and response\na json with following format.\n\n```json\n{\n \"\": \"\"\n}\n```\n\nThe `` tag is defined in config file and match with section label.\nFor example, in following config, the service would be `ngx`.\n\n```ini\n[ngx]\ntitle = Nginx\nunit = nginx.service\n```\n\nThe posible `` are.\n\n* start\n* stop\n* restart\n* reload\n* reloadorrestart\n* status\n* journal\n\nAll actions (except `status` and `journal`) return as result `OK` if can\ncommunicate with DBUS or `Fail` if any error occurs.\n\nFor `status` action, the posible responses are.\n\n* active (started unit)\n* reloading\n* inactive (stopped unit)\n* failed (stopped unit)\n* activating\n* deactivating\n* not-found (for inexistent unit)\n\nBy default `/api/v1//journal` returns 100 tail lines of journal\nfile of `` unit. You can specify the number of lines by this way.\n\n```\n/api/v1//journal/200\n```\n\nIn the example defined above all valid enpoins are.\n\n```\nhttp://127.0.0.1:10080/api/v1/ngx/start\nhttp://127.0.0.1:10080/api/v1/ngx/stop\nhttp://127.0.0.1:10080/api/v1/ngx/restart\nhttp://127.0.0.1:10080/api/v1/ngx/reload\nhttp://127.0.0.1:10080/api/v1/ngx/reloadorrestart\nhttp://127.0.0.1:10080/api/v1/ngx/status\nhttp://127.0.0.1:10080/api/v1/ngx/journal\nhttp://127.0.0.1:10080/api/v1/ngx/journal/\n```\n\n[1]: https://aur.archlinux.org/packages/sysdweb/", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ogarcia/sysdweb", "keywords": "systemd web api easy", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "sysdweb", "package_url": "https://pypi.org/project/sysdweb/", "platform": "", "project_url": "https://pypi.org/project/sysdweb/", "project_urls": { "Homepage": "https://github.com/ogarcia/sysdweb" }, "release_url": "https://pypi.org/project/sysdweb/1.1.3/", "requires_dist": null, "requires_python": "", "summary": "Control systemd services through Web or REST API", "version": "1.1.3" }, "last_serial": 4474212, "releases": { "1.1.2": [ { "comment_text": "", "digests": { "md5": "5ce97f1f05776dd18308430a0ed71647", "sha256": "8c5d67caeaa27acce70f2fd838d0d7ac7dc709b9e63571a33493b13c0cd4cc77" }, "downloads": -1, "filename": "sysdweb-1.1.2.tar.gz", "has_sig": false, "md5_digest": "5ce97f1f05776dd18308430a0ed71647", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 221051, "upload_time": "2018-02-28T13:00:04", "url": "https://files.pythonhosted.org/packages/e8/0f/4ff1598acfaab421bbdd7dc02a09ad7fd4d2e4be476800cd806e2d8a8dd8/sysdweb-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "3a0b2a81e9ece646daaeb965b1fd34b2", "sha256": "1dd7c0d8d02e41f818585f24cb2e4c7247254b951fd2e889d234f3963ba6804d" }, "downloads": -1, "filename": "sysdweb-1.1.3.tar.gz", "has_sig": false, "md5_digest": "3a0b2a81e9ece646daaeb965b1fd34b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 221992, "upload_time": "2018-11-11T13:04:13", "url": "https://files.pythonhosted.org/packages/b2/95/11597ec1886d912c4717410cfbb0742ae0e347e710ecf43d9f5e89481ca8/sysdweb-1.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3a0b2a81e9ece646daaeb965b1fd34b2", "sha256": "1dd7c0d8d02e41f818585f24cb2e4c7247254b951fd2e889d234f3963ba6804d" }, "downloads": -1, "filename": "sysdweb-1.1.3.tar.gz", "has_sig": false, "md5_digest": "3a0b2a81e9ece646daaeb965b1fd34b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 221992, "upload_time": "2018-11-11T13:04:13", "url": "https://files.pythonhosted.org/packages/b2/95/11597ec1886d912c4717410cfbb0742ae0e347e710ecf43d9f5e89481ca8/sysdweb-1.1.3.tar.gz" } ] }