Skip to content

Commit

Permalink
一键安装脚本
Browse files Browse the repository at this point in the history
  • Loading branch information
EtherDream committed May 14, 2019
1 parent fbb537d commit 1039991
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,24 @@ https://zjcqoo.github.io/-----https://www.google.com
[之前版本](https://github.com/EtherDream/jsproxy/tree/first-ver)已不再更新。


# 安装
# 一键安装

```sh
curl https://raw.githubusercontent.com/EtherDream/jsproxy/master/i.sh | sh
```

(暂时只支持 Linux x64 版本。如果安装失败,尝试手动安装)


# 手动安装

新建一个 `jsproxy:nobody` 用户,在其主目录安装 nginx:

```bash
groupadd nobody
useradd jsproxy -g nobody --create-home
su jsproxy
su - jsproxy

cd ~
git clone --depth=1 https://github.com/EtherDream/jsproxy.git server

cd server
Expand Down
5 changes: 3 additions & 2 deletions i.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/usr/bin/env sh

SRC=https://raw.githubusercontent.com/EtherDream/jsproxy-bin/master/setup.sh
DST=/home/jsproxy/setup.sh

groupadd nobody
useradd jsproxy -g nobody --create-home

echo "download main script ..."
curl -s "https://raw.githubusercontent.com/EtherDream/jsproxy-bin/master/setup.sh" -o $DST
chmod +x $DST
curl -s $SRC -o $DST

chmod +x $DST
su - jsproxy -c $DST
3 changes: 2 additions & 1 deletion log-svc/svc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
# 功能:定时调用 backup.sh

echo "log svc running"
CUR_DIR=$(cd `dirname $0` && pwd)

# 也可用 crontab
while true
do
./backup.sh
$CUR_DIR/backup.sh
sleep 60
done
1 change: 1 addition & 0 deletions release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git archive --format=tar --prefix=server/ master > ../bin/src/server.tar

0 comments on commit 1039991

Please sign in to comment.