Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

判断并安装sudo #50

Open
wants to merge 84 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
9ba8ff0
Update ccaa.sh
crazypeace Dec 25, 2020
bc266a0
Update README.md
crazypeace Dec 25, 2020
0ccc9b7
Update ccaa.sh
crazypeace Dec 25, 2020
20368e5
Update ccaa.sh
crazypeace Dec 25, 2020
6901b4a
Update ccaa.sh
crazypeace Dec 25, 2020
04ca4e5
Update ccaa.sh
crazypeace Dec 25, 2020
ee1443c
Update ccaa.sh
crazypeace Dec 25, 2020
495d55f
Update ccaa.sh
crazypeace Dec 25, 2020
bc097b1
Update ccaa.sh
crazypeace Dec 25, 2020
e0ebc85
Update ccaa.sh
crazypeace Dec 25, 2020
7dbfb78
Update ccaa.sh
crazypeace Dec 25, 2020
c131dbf
Update ccaa.sh
crazypeace Dec 25, 2020
d11c63f
Update ccaa.sh
crazypeace Dec 25, 2020
d86d364
Update ccaa.sh
crazypeace Dec 25, 2020
e309e0c
Update ccaa.sh
crazypeace Dec 25, 2020
2afa417
Update README.md
crazypeace Dec 25, 2020
67c853f
Update ccaa.sh
crazypeace Dec 27, 2020
dba063d
Update ccaa.sh
crazypeace Dec 28, 2020
a8db1b3
Update README.md
crazypeace Dec 29, 2020
7e36f87
Add files via upload
crazypeace May 7, 2021
07cc5ab
不停止caddy
crazypeace Jan 23, 2022
63950d7
Update README.md
crazypeace Jan 23, 2022
aafb200
Update README.md
crazypeace Jan 23, 2022
005c6f5
Update version.txt
crazypeace Jan 23, 2022
be66bab
Delete dccaa
crazypeace Jan 23, 2022
68fc9a6
Delete docker-ccaa.sh
crazypeace Jan 23, 2022
a142154
Delete Dockerfile
crazypeace Jan 23, 2022
597c34f
Delete ccaa_web.tar.gz
crazypeace Jan 23, 2022
4589494
Update README.md
crazypeace Jan 23, 2022
d79b812
Delete aria2-1.35.0-linux-gnu-64bit-build1.tar.bz2
crazypeace Jan 23, 2022
f448342
Delete linux-amd64-filebrowser.tar.gz
crazypeace Jan 23, 2022
d262437
remove cdn option
crazypeace Jan 23, 2022
7829890
Update README.md
crazypeace Apr 17, 2022
409071e
Update README.md
crazypeace Apr 18, 2022
5c95b48
https://api.myip.la
crazypeace Apr 20, 2022
f34dae2
Update README.md
crazypeace May 11, 2022
25109d9
add default_secret
crazypeace May 12, 2022
42bff7b
tiny update
crazypeace May 12, 2022
5591040
rm -rf ./ccaa_tmp
crazypeace May 12, 2022
1557ac3
update readme
crazypeace May 12, 2022
2e3a726
支持IPv6的http格式
crazypeace Sep 25, 2022
e823955
支持IPV6
crazypeace Jun 9, 2023
45088f2
Update README.md
crazypeace Jun 9, 2023
efe0e74
Update README.md
crazypeace Jun 9, 2023
45dda47
Update uninstall.sh
crazypeace Jun 9, 2023
1ab8299
Update ccaa.sh
crazypeace Jun 9, 2023
d631c27
update aria2 filebrowser version
crazypeace Jun 9, 2023
3177293
改进
crazypeace Jun 10, 2023
dac7489
3TERX的bt-tracker https://trackers.p3terx.com/all_aria2.txt
crazypeace Jun 10, 2023
ab1c140
systemctl enable 启用服务
crazypeace Jul 30, 2023
8489c9d
2.25
crazypeace Oct 19, 2023
61f64a3
"root":"_ccaaDown_",
crazypeace Oct 20, 2023
9e65063
_ccaaUser_
crazypeace Oct 20, 2023
a3438a6
update
crazypeace Oct 20, 2023
51e2a8c
echo -e "File Browser 用户名:${green}${filebrowserUser}${none}"
crazypeace Oct 20, 2023
d461e33
Update filebrowser.service
crazypeace Oct 20, 2023
cf85699
Update ccaa_web.service
crazypeace Oct 20, 2023
bef87aa
Update aria2.service
crazypeace Oct 20, 2023
67639ec
Update ccaa.sh
crazypeace Oct 20, 2023
6522701
Merge pull request #3 from crazypeace/crazypeace-patch-1
crazypeace Oct 20, 2023
94de823
small update
crazypeace Oct 20, 2023
056451c
use service
crazypeace Oct 21, 2023
2751a90
upbt.sh 选择不同的bt-tracker源
crazypeace Oct 21, 2023
e559c14
use service ; choose bt-tracker source
crazypeace Oct 21, 2023
c49f65c
ExecStart=/usr/sbin/ccaa_web
crazypeace Oct 21, 2023
4f026a9
colorful
crazypeace Oct 21, 2023
c5ff367
uninstall service
crazypeace Oct 21, 2023
44a49fb
colorful update
crazypeace Oct 21, 2023
165dc20
read -p colorful
crazypeace Oct 21, 2023
f8b0d5e
update
crazypeace Oct 21, 2023
35a3cca
ccaasudo-v20231021
crazypeace Oct 21, 2023
14dd3f3
filebrowser v2.26.0
crazypeace Jan 2, 2024
4b501e2
AriaNg 1.3.7
crazypeace Jan 2, 2024
b3898a7
Add files via upload
crazypeace Jan 2, 2024
e14531a
编译的成品 Aria2 v1.37.0 移到 gitlab 了, 本脚本没有更新
crazypeace Jan 2, 2024
a32c391
Aria2 v1.37.0
crazypeace Jan 2, 2024
4e7ac39
Aria2 v1.37.0
crazypeace Jan 2, 2024
99f83a1
aria2-1.37.0-linux-gnu-64bit-build1.tar.bz2
crazypeace Jan 2, 2024
92e0873
aria2-1.37.0
crazypeace Jan 2, 2024
f2a7ff5
Update README.md
crazypeace Jun 11, 2024
66c3b31
Merge pull request #6 from crazypeace/crazypeace-patch-1
crazypeace Jun 11, 2024
35217d2
Update ccaa.sh
crazypeace Aug 16, 2024
7dde996
ccaa_web 增加监听host参数
crazypeace Oct 9, 2024
6557631
https://github.com/filebrowser/filebrowser/releases/download/v2.31.2/…
crazypeace Oct 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions Dockerfile

This file was deleted.

66 changes: 33 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# 一键安装
```
bash <(curl -L git.io/ccaasudo.sh)
```

# 我的改动
- 某些VPS上没有安装sudo,脚本跑出来结果是不能运行的。此repo添加了自动判断并安装sudo的功能
- 本来就没有安装caddy,卸载时不需要杀caddy进程
- 把ccaa_web放到repo里
- 去掉Docker相关文件,想用Docker请去原repo https://github.com/helloxz/ccaa
- 支持选择IPv4或IPv6
- 生成默认RPC 密钥
- 生成一条URL设置服务端参数(地址,端口,path,协议,RPC密钥)
![image](https://github.com/crazypeace/ccaa/assets/665889/77d91798-f39d-4a88-8b18-cc11bf25fb87)


# Aria2 下载完成后自动转移到rclone挂载的网盘
https://github.com/crazypeace/aria2_auto_rclone

## 用你的STAR告诉我这个Repo对你有用 Welcome STARs! :)

[![Stargazers over time](https://starchart.cc/crazypeace/ccaa.svg)](https://starchart.cc/crazypeace/ccaa)

<details>
<summary>原项目readme (点击展开)</summary>

# CCAA

原为`CentOS + Caddy + AriaNg + Aria2`,故命名为CCAA,不过现在不仅仅支持CentOS,主流的Debian、Ubuntu也已经支持,自2.0版本已移除Caddy,改用Golang写了一个简单的webserver来运行AriaNg
Expand All @@ -24,10 +50,7 @@

一键安装脚本(使用root用户):
```bash
#海外
bash <(curl -Lsk https://raw.githubusercontent.com/helloxz/ccaa/master/ccaa.sh)
#国内
bash <(curl -Lsk https://raw.githubusercontent.com/helloxz/ccaa/master/ccaa.sh) cdn
bash <(curl -L git.io/ccaasudo.sh)
```
如果出现`-bash: curl: command not found`错误,说明`curl`命令没安装,请输入下面的命令先安装`curl`,再回过头来执行上面的命令再来一次。

Expand All @@ -38,41 +61,18 @@ apt-get -y install curl
yum -y install curl
```

### Docker安装
```bash
docker run --name="ccaa" -d -p 6080:6080 -p 6081:6081 -p 6800:6800 -p 51413:51413 \
-v /data/ccaaDown:/data/ccaaDown \
-e PASS="xiaoz.me" \
helloz/ccaa \
sh -c "dccaa pass && dccaa start"
```

* 第一个`/data/ccaaDown`为本地目录,CCAA下载后的内容会保存在此目录,请根据自身情况设置
* `xiaoz.me`为Aria2密钥,运行的时候请修改为自己的密码
* 文件管理默认用户名为`ccaa`,密码为`admin`,登录后可在后台修改


### 常用命令

* ccaa:进入CCAA操作界面
* ccaa status:查看CCAA运行状态
* ccaa stop:停止CCAA
* ccaa start:启动CCAA
* ccaa restart:重启CCAA
* ccaa -v:查看CCAA版本(2.0开始支持)

### 部分截图

![](https://imgurl.org/upload/1810/e8bf5842058b46c5.png)

![](https://imgurl.org/upload/1810/1180fb03eb3117ce.png)

### 联系我

* Blog: [https://www.xiaoz.me/](https://www.xiaoz.me/)
* QQ: 337003006
* 技术交流群: 147687134
* ccaa -v:查看CCAA版本

### 请我喝一杯咖啡
### 注意 本脚本使用的不是官方的 Aria2
而是一个编译的成品. Github 上面的版本只更新到 v1.36.0 后续新版本(v1.37.0及以后)转到Gitlab上面了.
https://gitlab.com/q3aql/aria2-static-builds/
我搬了一个到本Repo, 脚本里使用的也是本Repo的url.

![](https://imgurl.org/upload/1712/cb349aa4a1b95997.png)
</details>
Binary file added aria2-1.37.0-linux-gnu-64bit-build1.tar.bz2
Binary file not shown.
46 changes: 32 additions & 14 deletions ccaa
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
##### CCAA管理脚本 #####
##### Author:xiaoz.me #####
##### Update:2020-02-27 #####
#############################################################
##### use service #####
##### 优化: crazypeace #####
##### Github: https://github.com/crazypeace/ccaa #####
#############################################################

#导入环境变量
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/bin:/sbin
Expand All @@ -14,40 +19,53 @@ filebrowser_pid=$(pgrep 'filebrowser')
#如果变量不存在
if [ ! $1 ]
then
bash <(curl -Lsk https://raw.githubusercontent.com/helloxz/ccaa/master/ccaa.sh)

echo '...CCAA管理脚本用法...
#查看ccaa状态
ccaa status
#启动ccaa
ccaa start
#停止ccaa
ccaa stop
#重启ccaa
ccaa restart
#查看当前版本
ccaa -v'

bash <(curl -Lsk https://raw.githubusercontent.com/crazypeace/ccaa/master/ccaa.sh)
exit
fi

case $1 in
'start')
nohup sudo -u ccaa aria2c --conf-path=/etc/ccaa/aria2.conf > /var/log/aria2.log 2>&1 &
nohup sudo -u ccaa /usr/sbin/ccaa_web > /var/log/ccaa_web.log 2>&1 &
nohup sudo -u ccaa filebrowser -c /etc/ccaa/config.json > /var/log/fbrun.log 2>&1 &
service aria2 start
service ccaa_web start
service filebrowser start
exit
;;
'stop')
kill -9 ${aria2pid}
kill -9 ${ccaa_web_pid}
kill -9 ${filebrowser_pid}
service aria2 stop
service ccaa_web stop
service filebrowser stop
exit
;;
'restart')
kill -9 ${aria2pid}
kill -9 ${ccaa_web_pid}
kill -9 ${filebrowser_pid}
nohup sudo -u ccaa aria2c --conf-path=/etc/ccaa/aria2.conf > /var/log/aria2.log 2>&1 &
nohup sudo -u ccaa /usr/sbin/ccaa_web > /var/log/ccaa_web.log 2>&1 &
nohup sudo -u ccaa filebrowser -c /etc/ccaa/config.json > /var/log/fbrun.log 2>&1 &
exit;
service aria2 restart
service ccaa_web restart
service filebrowser restart
exit
;;
'status')
if [ "$aria2pid" == "" ]
then
echo "Not running!"
else
echo '-----------------------------------------------'
cat /etc/ccaa/aria2.conf | grep 'rpc-secret='
echo "Aria2 is running,pid is ${aria2pid}."
echo "AriaNg is running,pid is ${ccaa_web_pid}."
echo "Filebrowser is running,pid is ${filebrowser_pid}."
echo '原版帮助文档: https://dwz.ovh/ccaa (必看)'
echo '-----------------------------------------------'
fi
;;
Expand Down
Loading