{"id":16086181,"url":"https://github.com/zw963/deployment_bash","last_synced_at":"2025-10-05T20:16:05.317Z","repository":{"id":147696252,"uuid":"100289880","full_name":"zw963/deployment_bash","owner":"zw963","description":"Write one bash script which both interactive with local bash shell and remote host ssh shell, for the purpose of deployment.","archived":false,"fork":false,"pushed_at":"2022-06-01T11:48:21.000Z","size":64,"stargazers_count":1,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T18:11:28.474Z","etag":null,"topics":["bash","deployment","linux","server"],"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/zw963.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-08-14T16:54:28.000Z","updated_at":"2021-12-19T08:58:15.000Z","dependencies_parsed_at":"2023-06-27T16:46:13.920Z","dependency_job_id":null,"html_url":"https://github.com/zw963/deployment_bash","commit_stats":null,"previous_names":[],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/zw963/deployment_bash","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zw963%2Fdeployment_bash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zw963%2Fdeployment_bash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zw963%2Fdeployment_bash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zw963%2Fdeployment_bash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zw963","download_url":"https://codeload.github.com/zw963/deployment_bash/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zw963%2Fdeployment_bash/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278510956,"owners_count":25999014,"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-10-05T02:00:06.059Z","response_time":54,"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":["bash","deployment","linux","server"],"created_at":"2024-10-09T13:11:03.647Z","updated_at":"2025-10-05T20:16:05.312Z","avatar_url":"https://github.com/zw963.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Because GFW from china, this project only updated on https://gitlab.com/zw963/deployment_bash\n\n## Use deployment_bash deploy a app to remote VPS.\n\n\nFollowing is a example will explain what we did and what you want.\n\nThe purpose of this script is to deploy a app located in github, which\ndeploy a lightweight SOCKS5 forward proxy to Ubuntu or CentOS.\n\noriginal deploy code is [here](https://github.com/zw963/asuswrt-merlin-transparent-proxy/blob/master/deploy_ss_to_vps).\n\n```sh\n#!/bin/sh\n\n# download this code, and eval.\nself=\"$(curl https://raw.githubusercontent.com/zw963/deployment_bash/v0.2.2/deploy_start.sh)\" \u0026\u0026 eval \"$self\"\n\n# target is necessory, for use internal.\n# any environemnt variable expect availabe in remote VPS deployment process\n# need declar with export, e.g. `export abc=100`, only `abc=100`, abc not available remote.\nexport target=$1\n\n# copy command copy a local file to remote, if VPS target directory not exist, will created automatically.\n# copy support rsync options, e.g.\n# copy ss-server/config.json /etc/shadowsocks/config.json -u\n# will override remote file only local is newer.\n\ncopy ss-server/config.json /etc/shadowsocks/config.json\n\n\n# this line is necessory, after this line, will execute in remote ssh shell.\ndeploy_start\n\n# # Following can be any valid bash code which will be execute on remote VPS ssh shell.\n\n# replace_string 'origin' 'new' file\n# more function available, see source code.\nreplace_string 'mypassword' \"你的密码\" /etc/shadowsocks/config.json\n\ncat \u003c\u003c'HEREDOC' \u003e /etc/sysctl.d/98-shadowsocks.conf\nfs.file-max=51200\n\nnet.core.rmem_max=67108864\nnet.core.wmem_max=67108864\nnet.core.netdev_max_backlog=250000\nnet.core.somaxconn=4096\n\nnet.ipv4.tcp_syncookies=1\nnet.ipv4.tcp_tw_reuse=1\nnet.ipv4.tcp_tw_recycle=0\nnet.ipv4.tcp_fin_timeout=30\nnet.ipv4.tcp_keepalive_time=1200\nnet.ipv4.ip_local_port_range=10000 65000\nnet.ipv4.tcp_max_syn_backlog=8192\nnet.ipv4.tcp_max_tw_buckets=5000\nnet.ipv4.tcp_fastopen=3\nnet.ipv4.tcp_mem=25600 51200 102400\nnet.ipv4.tcp_rmem=4096 87380 67108864\nnet.ipv4.tcp_wmem=4096 65536 67108864\nnet.ipv4.tcp_mtu_probing=1\nnet.ipv4.tcp_congestion_control=hybla\nHEREDOC\n\n# package list support is limited, will add more later\n# if you want, please let me know.\npackage compile-tools pcre-devel asciidoc xmlto mbedtls-devel libsodium-devel udns-devel libev-devel haveged\n\n# download_and_extract is for extract files from a remote url.\n[ -d shadowsocks-libev-3.0.8 ] || download_and_extract https://github.com/shadowsocks/shadowsocks-libev/releases/download/v3.0.8/shadowsocks-libev-3.0.8.tar.gz\n\n# daemon is use systemctl to wrapper process.\n# daemon 'name' 'full path to run'\n\ncd shadowsocks-libev-3.0.8/ \u0026\u0026\n    configure shadowsocks \u0026\u0026\n    make \u0026\u0026\n    make install-strip \u0026\u0026\n    daemon shadowsocks '/usr/bin/ss-server -u --fast-open -c /etc/shadowsocks/config.json'\n\nserver_port=$(cat /etc/shadowsocks/config.json |grep 'server_port\"' |grep -o '[0-9]*')\n# use to expose a port in server.\nexpose_port $server_port\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzw963%2Fdeployment_bash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzw963%2Fdeployment_bash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzw963%2Fdeployment_bash/lists"}