{"id":16119487,"url":"https://github.com/downgoon/shconf","last_synced_at":"2026-02-10T01:32:43.105Z","repository":{"id":77273932,"uuid":"87394540","full_name":"downgoon/shconf","owner":"downgoon","description":"a bash config toolkit supporting Spring-like \"property placeholder\" and getting/setting config value of specified key ","archived":false,"fork":false,"pushed_at":"2017-04-10T03:35:16.000Z","size":11,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-02T09:12:04.746Z","etag":null,"topics":["bash","placeholder","useful-scripts"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/downgoon.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":"2017-04-06T06:32:20.000Z","updated_at":"2023-02-07T22:34:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"3b1ac2d4-f552-4eb3-ab25-9cc6ea3c3e89","html_url":"https://github.com/downgoon/shconf","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/downgoon/shconf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fshconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fshconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fshconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fshconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/downgoon","download_url":"https://codeload.github.com/downgoon/shconf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/downgoon%2Fshconf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29288465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T21:57:15.303Z","status":"ssl_error","status_checked_at":"2026-02-09T21:57:11.537Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["bash","placeholder","useful-scripts"],"created_at":"2024-10-09T20:54:17.277Z","updated_at":"2026-02-10T01:32:43.089Z","avatar_url":"https://github.com/downgoon.png","language":"Shell","readme":"# shconf\n\n``shconf`` is a bash config toolkit supporting Spring-like \"property placeholder\" and getting/setting config value of specified key.\n\nfunction testing ok on these platforms:\n\n- Mac Darwin\n- CentOS 6.X\n- Ubuntu 14.X\n\n## QuickStart\n\n- Usage\n\n```\n$ shconf\nUsage (long format): shconf {version|getprop|setprop|replaceby}\nUsage (short format): shconf {-v|-g|-s|-r}\n\n```\n\n- getting config value\n\n```\n$ shconf -g backend.service example/app.conf\n10.10.1.100:8080\n```\n\n## Preparation\n\n- centralized conf: ``app.conf``\n\na global configuration file ``example/app.conf`` :\n\n```\n#\n# application global configuration\n#\n\nhost=192.168.1.100  # nginx listening host\n# nginx listenning port\nport =  80\n\nbackend.service=10.10.1.100:8080\nboxstore.root.dir=/opt/boxstore\n\n#sync=false\nnot.found.key=NotFound\n\nOther lines\n\n```\n\n- overwritten conf: ``nginx.conf``\n\ncode snippets of ``example/nginx.conf`` :\n\n```\nupstream databaseupstream {\n        server ${backend.service};\n}\n\nserver {\n  listen       ${port};\n  server_name  ${host};\n\n  location /boxstore {\n     alias ${boxstore.root.dir};\n     autoindex on;\n     autoindex_exact_size  off;\n     autoindex_localtime on;\n  }\n\n}  \n\n```\n\n## What to do\n\noverwrite placeholder variables like ``${backend.service}``, ``${port}`` and ``${boxstore.root.dir}`` refereed in ``example/nginx.conf`` with the value assigned in ``example/app.conf`` before ``example/nginx.conf`` loaded by application such as ``nginx`` http server.\n\n\n## How to\n\n```\nreplaceby.sh example/nginx.conf example/app.conf\n```\nOR\n\n```\n$ shconf replaceby example/nginx.conf example/app.conf\n```\n\noverwritten contents:\n\n```\nupstream databaseupstream {\n        server 10.10.1.100:8080;\n}\n\n.....\n\n```\n\n## Other Tools\n\n- get value of specified key\n\n```\n$ sh getprop.sh backend.service example/app.conf\n10.10.1.100:8080\n```\nOR\n```\n$ shconf getprop backend.service example/app.conf\n```\n\n- set value of specified key\n\n```\n$ setprop.sh backend.service 127.0.0.1:10086 example/app.conf\n$ sh getprop.sh backend.service example/app.conf\n127.0.0.1:10086\n```\n\nOR\n```\n$ shconf -r backend.service 127.0.0.1:10086 example/app.conf\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdowngoon%2Fshconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdowngoon%2Fshconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdowngoon%2Fshconf/lists"}