{"id":18690480,"url":"https://github.com/kvaps/fake-systemd","last_synced_at":"2026-03-14T04:31:34.157Z","repository":{"id":48042489,"uuid":"62912465","full_name":"kvaps/fake-systemd","owner":"kvaps","description":null,"archived":false,"fork":false,"pushed_at":"2021-08-10T09:01:46.000Z","size":27,"stargazers_count":44,"open_issues_count":3,"forks_count":16,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-12T05:54:40.646Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/kvaps.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":"2016-07-08T19:29:40.000Z","updated_at":"2025-03-26T04:38:13.000Z","dependencies_parsed_at":"2022-08-12T17:20:44.239Z","dependency_job_id":null,"html_url":"https://github.com/kvaps/fake-systemd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kvaps/fake-systemd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvaps%2Ffake-systemd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvaps%2Ffake-systemd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvaps%2Ffake-systemd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvaps%2Ffake-systemd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kvaps","download_url":"https://codeload.github.com/kvaps/fake-systemd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kvaps%2Ffake-systemd/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266959632,"owners_count":24012537,"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","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-07T10:47:42.151Z","updated_at":"2026-03-14T04:31:34.122Z","avatar_url":"https://github.com/kvaps.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fake Systemd\n\nSimple bash script using start-stop-daemon, instead of using original systemctl + dbus + priviliges + seccomp + x packages + conjunction of mercury and venus.\n\n## Status \n\nThis project is effectively unmaintained. I will do my best to shepherd pull requests, but cannot guarantee a prompt response and do not have bandwidth to address issues or add new features. Please let me know via an issue if you'd be interested in taking ownership of fake-systemd.\n\n## Usage\n\nThe container will only compile start-stop-daemon and put the file in systemctl.\nBuild\n\n    $ docker build -t ahmet2mir/fakesystemd .\n\nRun interactive docker\n\n    $ docker run --rm -it ahmet2mir/fakesystemd bash\n\nExample with httpd\n\n```\n[root@ff6625414fd4 /]# yum install httpd -y\n[root@ff6625414fd4 /]# systemctl start httpd\n\n[root@ff6625414fd4 ~]# systemctl status httpd \n● httpd.service - The Apache HTTP Server\n   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: not_implemented)\n   Active: active (running) since Tue Oct 24 09:23:20 2017\n/usr/bin/systemctl: line 236: [: man:httpd(8): binary operator expected\n Main PID: 5977 (httpd)\n   Memory: 0.0%\n   CGroup: /system.slice/httpd.service\n           └─5977 /usr/sbin/httpd -DFOREGROUND\n\n[root@ff6625414fd4 ~]# curl -XHEADER localhost\n\u003c!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\"\u003e\n\u003chtml\u003e\u003chead\u003e\n\u003ctitle\u003e501 Not Implemented\u003c/title\u003e\n\u003c/head\u003e\u003cbody\u003e\n\u003ch1\u003eNot Implemented\u003c/h1\u003e\n\u003cp\u003eHEADER to / not supported.\u003cbr /\u003e\n\u003c/p\u003e\n\u003c/body\u003e\u003c/html\u003e\n\n[root@ff6625414fd4 ~]# systemctl stop httpd  \n[root@ff6625414fd4 ~]# curl -XHEADER localhost\ncurl: (7) Failed connect to localhost:80; Connection refused\n\n[root@ff6625414fd4 ~]# systemctl enable httpd\nCreated symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.\n[root@ff6625414fd4 ~]# systemctl is-enabled httpd\nenabled\n[root@ff6625414fd4 ~]# systemctl is-active httpd\nfailed\n[root@ff6625414fd4 ~]# systemctl status httpd\n● httpd.service - The Apache HTTP Server\n   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: not_implemented)\n   Active: failed (Result: not_implemented)\n[root@ff6625414fd4 ~]# systemctl start httpd\n[root@ff6625414fd4 ~]# systemctl is-active httpd\nactive\n```\n\nExample with sshd\n\n```\n[root@ff6625414fd4 ~]# yum install -y openssh-clients openssh-server sshpass\n[root@ff6625414fd4 ~]# systemctl start sshd\n[root@ff6625414fd4 ~]# systemctl status sshd\n● sshd.service - OpenSSH server daemon\n   Loaded: loaded (/usr/lib/systemd/system/sshd.service; disabled; vendor preset: not_implemented)\n   Active: active (running) since Tue Oct 24 09:27:30 2017\n/usr/bin/systemctl: line 236: [: man:sshd(8): binary operator expected\n Main PID: 7189 (sshd)\n   Memory: 0.0%\n   CGroup: /system.slice/sshd.service\n           └─7189 /usr/sbin/sshd -D\n\n[root@ff6625414fd4 ~]# echo \"root:docker\" | chpasswd \n[root@ff6625414fd4 ~]# sshpass -p docker ssh -oStrictHostKeyChecking=no localhost uptime\n 09:29:28 up 5 days, 18:14,  0 users,  load average: 0.00, 0.02, 0.05\n```\n\n## Currently supported actions\n\n**Unit Commands:**\n\n* start\n* stop\n* restart\n* is-active\n* status: works with the pidfile,  if a PIDfile options isn't defined, one will be created in /run/UNIT_NAME.pid.\n\n**Unit File Commands:**\n\n* enable\n* disable\n* is-enabled \n\n**Variables:**\n\n* MAINPID\n\n**Specifiers:**\n\n* %i\n* %I\n* %n\n* %N\n\n**Unit Options:**\n\n* Description\n* Documentation\n\n**Install Options:**\n\n* WantedBy\n\n**Service Options:**\n\n* EnvironmentFile: if starting with a minus/dash (ex EnvironmentFile=-/etc/sysconfig/myconfig), errors are ignored\n* ExecStart\n* ExecStartPost\n* ExecStartPre\n* ExecStop\n* ExecStopPost\n* ExecStopPre\n* PIDFile\n* Type (oneshot, simple, notify and forking only)\n* User\n* WorkingDirectory\n\n`Exec[Start|Stop][Post|Pre]` commands with `\\` and multiples occurrence are supported well.\nIf a command starts with a minus/dash, the error is ignored.\n\n# Licences\n\n`Original fake-systemd` Copyright (c) 2017 kvaps Licence MIT https://opensource.org/licenses/MIT\n\nMany thanks to Ahmet Demir [ahmet2mir](https://github.com/ahmet2mir) for many improvements and continue development this script.\n\n`start-stop-daemon` is under public domain, see https://github.com/daleobrien/start-stop-daemon#notes\n\n```\nA rewrite of the original Debian's start-stop-daemon Perl script\nin C (faster - it is executed many times during system startup).\n\nWritten by Marek Michalkiewicz \u003cmarekm@i17linuxb.ists.pwr.wroc.pl\u003e,\npublic domain.  Based conceptually on start-stop-daemon.pl, by Ian\nJackson \u003cijackson@gnu.ai.mit.edu\u003e.  May be used and distributed\nfreely for any purpose.  Changes by Christian Schwarz\n\u003cschwarz@monet.m.isar.de\u003e, to make output conform to the Debian\nConsole Message Standard, also placed in public domain.  Minor\nchanges by Klee Dienes \u003cklee@debian.org\u003e, also placed in the Public\nDomain.\n\nChanges by Ben Collins \u003cbcollins@debian.org\u003e, added --chuid, --background\nand --make-pidfile options, placed in public domain aswell.\n\nPort to OpenBSD by Sontri Tomo Huynh \u003chuynh.29@osu.edu\u003e\n               and Andreas Schuldei \u003candreas@schuldei.org\u003e\nChanges by Ian Jackson: added --retry (and associated rearrangements).\n\nModified for Gentoo rc-scripts by Donny Davies \u003cwoodchip@gentoo.org\u003e:\n I removed the BSD/Hurd/OtherOS stuff, added #include \u003cstddef.h\u003e\n and stuck in a #define VERSION \"1.9.18\".  Now it compiles without\n the whole automake/config.h dance.\n```\n    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkvaps%2Ffake-systemd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkvaps%2Ffake-systemd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkvaps%2Ffake-systemd/lists"}