{"id":18084947,"url":"https://github.com/coderofsalvation/nohupr","last_synced_at":"2025-04-06T00:13:49.129Z","repository":{"id":146965531,"uuid":"541552042","full_name":"coderofsalvation/nohupr","owner":"coderofsalvation","description":"the 6K minimalist way to manage an multi-app linux server","archived":false,"fork":false,"pushed_at":"2022-09-29T14:32:56.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-12T06:22:31.110Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderofsalvation.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-26T11:32:05.000Z","updated_at":"2023-01-18T18:26:36.000Z","dependencies_parsed_at":"2023-05-11T05:30:48.531Z","dependency_job_id":null,"html_url":"https://github.com/coderofsalvation/nohupr","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/coderofsalvation%2Fnohupr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fnohupr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fnohupr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Fnohupr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderofsalvation","download_url":"https://codeload.github.com/coderofsalvation/nohupr/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415976,"owners_count":20935387,"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-31T15:08:45.032Z","updated_at":"2025-04-06T00:13:49.123Z","avatar_url":"https://github.com/coderofsalvation.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"`nohupr` is the 6kb `docker-compose` of the unix `nohup` \u0026 `kill` utility.\n\n\u003e powered by ~800k of classic, battlehardened unix dependencies (`find awk lsof readlink socat dirname find kill`)\n\nIt is slimmer than [pm.sh](https://github.com/coderofsalvation/pm.sh) and works without git/ssh (like [podi](https://github.com/coderofsalvation/podi))\n\n## install on your server!\n\n```\n$ wget \"https://raw.githubusercontent.com/coderofsalvation/nohupr/main/nohupr\" \n$ chmod 755 nohupr\n$ ./nohupr\nusage: \n    install                   allow process to keep running after logout \n    start [dir]               starts ./app.sh [recursive] in background\n    stop [dir]                stops ./app.sh [recursive]\n    restart                   runs stop \u0026 start\n    ps                        lists running process(es) \n    logs                      show logs of ./app.sh\n    http                      receive trigger from http\n```\n\n## create some apps!\n\n```\n$ echo 'pwd; sleep 1m' \u003e /home/john/app1/app.sh\n$ echo 'pwd; sleep 1m' \u003e /home/john/app1/app2/app.sh\n$ echo 'pwd; sleep 1m' \u003e /home/sarah/app3/app.sh\n\n$ ./nohupr start /home/john\n [✓] start\n  │  [✓] /home/john/app1/app.sh\n  │  [✓] /home/john/app1/app2/app.sh\n\n$ cd /home/john/app1\napp1 $ nohupr stop\n [✓] stop\n```\n\n\u003e optionally these could be git-repositories with an `app.sh` file as entry-point\n\n## run all user apps during boot\n\n```\n$ nohupr systemd\n [✓] systemd\n  │  wrote /tmp/nohupr.service\n  │  wrote /tmp/nohupr.sh\nplease verify the files above, and install them by running:\n\n  sudo mv /tmp/nohupr.service /lib/systemd/system/.\n  sudo mv /tmp/nohupr.sh      /root/.\n  sudo systemctl daemon-reload \n  sudo systemctl enable nohupr.service \n  sudo systemctl start nohupr.service \n\n```\n\n## enable control over ssh ('lingering'):\n\n```\n$ ssh john@myserver\nmyserver $ nohupr install\n [✓] install\n+ sudo loginctl enable-linger john\n[sudo] password for john: ******\n\nmyserver $ nohupr restart .     # restart all apps\nmyserver $ exit                  # apps will now linger(*) after logout\n```\n\n\u003e \\* = `nohup` apps won't be killed after logout\n\n## allow (limited) triggers from http!\n\nin case your app has zero http-features, now it has (using `socat`):\n\n```\n$ cd /home/john/app1\n$ nohupr http\n [✓] http\nenter portnumber: 3889\n  │  created '.port'\nenter max parallel processes: 4\n  │  created '.parallel'\n  │  created '.on.http'\n  │  listening on 3889 [max 4 processes]\n  │  ./.on.http is triggered by: curl http://127.0.0.1:3889 --http0.9 \n\n\n$ curl http://127.0.0.1:3889 --http0.9           # another terminal\n.on.http: received GET / HTTP/1.1 from 127.0.0.1\n```\n\n\u003e now everytime `nohupr start` is invoked, the `.on.http` will listen on your port\n\nuse-cases for `.on.http`:\n\n* let CI/CD curl-cmd trigger a deployment: `git reset --hard \u0026\u0026 git pull origin master \u0026\u0026 nohupr restart`\n* run a backup thru scheduled CI/CD curl-cmd: `zip -ru /backup.zip /`\n* any situation which doesn't require millions of requests\n\n## auto-restart ./app.sh\n\n./app.sh\n```\nwhile sleep 2s; do \n  time python3 myapp.py\n  echo \"exited at $(date)\"\ndone\n```\n\n# why nohupr\n\nMinimalism..nonbloated servers..bliss of simplicity.\u003cbr\u003e\nBecause single-app-servers combined with moore's law (multi-core cpus) is a bit silly in some cases. \nThis is a 'docker-compose' for nohup (which allows you to start all apps using 1 systemd/runit file).\n\n# test\n\n```\n$ ./test/test.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderofsalvation%2Fnohupr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderofsalvation%2Fnohupr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderofsalvation%2Fnohupr/lists"}