{"id":30380184,"url":"https://github.com/bisrael8191/systemdeps","last_synced_at":"2026-05-17T00:55:07.258Z","repository":{"id":57552055,"uuid":"182566615","full_name":"bisrael8191/systemdeps","owner":"bisrael8191","description":"Manage systemd service dependencies using drop-in configuration files, similar to using docker compose files","archived":false,"fork":false,"pushed_at":"2019-04-21T18:57:50.000Z","size":9,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-20T20:55:48.437Z","etag":null,"topics":["docker-compose","systemd","systemd-service","systemd-unit"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bisrael8191.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}},"created_at":"2019-04-21T18:07:55.000Z","updated_at":"2020-11-30T17:36:25.000Z","dependencies_parsed_at":"2022-09-20T12:43:28.377Z","dependency_job_id":null,"html_url":"https://github.com/bisrael8191/systemdeps","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bisrael8191/systemdeps","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bisrael8191%2Fsystemdeps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bisrael8191%2Fsystemdeps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bisrael8191%2Fsystemdeps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bisrael8191%2Fsystemdeps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bisrael8191","download_url":"https://codeload.github.com/bisrael8191/systemdeps/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bisrael8191%2Fsystemdeps/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33124143,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T18:38:32.183Z","status":"ssl_error","status_checked_at":"2026-05-16T18:38:29.903Z","response_time":115,"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":["docker-compose","systemd","systemd-service","systemd-unit"],"created_at":"2025-08-20T20:30:20.506Z","updated_at":"2026-05-17T00:55:07.242Z","avatar_url":"https://github.com/bisrael8191.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# systemdeps\nUtility library that manages systemd service dependencies using drop-in\nconfiguration files instead of modifying the installed unit file.\n\nService dependencies can be stored in a JSON file so that it is similar\nto defining services and depends_on links in docker compose.\n\nFor example, the base services can be installed using generic Ansible roles\nthen independently ordered per VM based on it's needs.\n\nOptionally, can create a top-level application to manage all underlying processes\nusing standard systemd commands:\n  systemctl [start | stop | restart | enable | disable] application.target\n\nReferences\n\nhttps://www.freedesktop.org/software/systemd/man/systemd.unit.html\nhttps://www.freedesktop.org/software/systemd/man/systemd.target.html\n\n\n**Documentation**: https://godoc.org/github.com/bisrael8191/systemdeps\n\n## Use as a library\n```go\nimport (\n\t\"fmt\"\n    \"log\"\n    \"github.com/bisrael8191/systemdeps\"\n)\n\n// Creates a top-level systemd target that controls all sub-processes\n// and correctly orders all of the process dependencies.\nfunc Example() {\n    // Load JSON process dependencies \n    // (optional, can also create the Process structs manually, see systemdeps_test.go)\n\tprocesses, err := ReadDependencyFile(\"dependencies.json\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t\treturn\n\t}\n\n\t// Check process dependencies for cycles\n\tcycle, graph := HasCycle(processes)\n\tif cycle {\n\t\tfmt.Println(\"Cycle found between\", graph.CycleStart, \"and\", graph.CycleEnd)\n\t} else {\n\t\t// No cycles found, create required drop-in files and configure systemd\n\t\terr := ConfigureSystemd(\"/etc/systemd/system\", \"my-test-app\", true, processes)\n\t\tif err != nil {\n\t\t\tlog.Fatal(err)\n\t\t}\n    }\n}\n```\n\n## Run as application\n\n### Build/Install\n* Get dependencies: `go get`\n* Install to $GOPATH/bin: `go install bin/entry.go`\n\n### Run\n* Help: `$GOBIN/entry -h`\n```\nUsage of entry:\n  -app string\n        create a top-level application to manage all services\n  -config string\n        path of dependency file (default \"dependencies.json\")\n  -dryrun\n        don't modify system, print out modified files\n  -systemdpath string\n        systemd path (default \"/etc/systemd/system/\")\n```\n\n* Test (output files without modifying systemd): `$GOBIN/entry -config dependencies.json -app my-test-app -dryrun`\n\n* Dependencies with top-level app: `$GOBIN/entry -config dependencies.json -app my-test-app`\n\n* Dependencies without top-level app: `$GOBIN/entry -config dependencies.json`\n\n* Use user-space systemd: `$GOBIN/entry -config dependencies.json -app my-test-app -systemdpath ~/.config/systemd/user/`\n  * See Arch wiki for more details: https://wiki.archlinux.org/index.php/Systemd/User#Basic_setup\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbisrael8191%2Fsystemdeps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbisrael8191%2Fsystemdeps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbisrael8191%2Fsystemdeps/lists"}