File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed
Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 11# 更新日志
22
3+ 2024.11.17
4+
5+ - 增加自启动任务,确保容器在意外重启的情况下依然能自启动SSH进程
6+
372024.06.05
48
59- 更新SSH设置规则,适配Ubuntu24
Original file line number Diff line number Diff line change 11# docker
22
3- [ ![ Hits] ( https://hits.seeyoufarm.com/api/count/incr/badge .svg?url=https%3A%2F%2Fgithub.com%2FspiritLHLS%2Fdocker&count_bg=%2379C83D &title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits& edge_flat=false )] ( https://hits.seeyoufarm.com )
3+ [ ![ Hits] ( https://hits.spiritlhl.net/docker .svg?action=hit&title=Hits &title_bg=%23555555&count_bg=%230eecf8& edge_flat=false )] ( https://hits.spiritlhl.net )
44
55## 更新
66
7- 2024.11.17
7+ 2025.03.29
88
9- - 增加自启动任务,确保容器在意外重启的情况下依然能自启动SSH进程
9+ - 修复Hits徽章访问量统计,使用 https://github.com/oneclickvirt/hitscounter
1010
1111[ 更新日志] ( CHANGELOG.md )
1212
Original file line number Diff line number Diff line change @@ -75,12 +75,11 @@ rebuild_cloud_init() {
7575 fi
7676}
7777
78- statistics_of_run-times () {
79- COUNT=$(
80- curl -4 -ksm1 " https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FspiritLHLS%2Fdocker&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=&edge_flat=true" 2>&1 ||
81- curl -6 -ksm1 " https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2FspiritLHLS%2Fdocker&count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=&edge_flat=true" 2>&1
82- ) &&
83- TODAY=$( expr " $COUNT " : ' .*\s\([0-9]\{1,\}\)\s/.*' ) && TOTAL=$( expr " $COUNT " : ' .*/\s\([0-9]\{1,\}\)\s.*' )
78+ statistics_of_run_times () {
79+ COUNT=$( curl -4 -ksm1 " https://hits.spiritlhl.net/docker?action=hit&title=Hits&title_bg=%23555555&count_bg=%2324dde1&edge_flat=false" 2> /dev/null ||
80+ curl -6 -ksm1 " https://hits.spiritlhl.net/docker?action=hit&title=Hits&title_bg=%23555555&count_bg=%2324dde1&edge_flat=false" 2> /dev/null)
81+ TODAY=$( echo " $COUNT " | grep -oP ' "daily":\s*[0-9]+' | sed ' s/"daily":\s*\([0-9]*\)/\1/' )
82+ TOTAL=$( echo " $COUNT " | grep -oP ' "total":\s*[0-9]+' | sed ' s/"total":\s*\([0-9]*\)/\1/' )
8483}
8584
8685check_update () {
@@ -321,7 +320,7 @@ if [ ! -d /usr/local/bin ]; then
321320 mkdir -p /usr/local/bin
322321fi
323322rebuild_cloud_init
324- statistics_of_run-times
323+ statistics_of_run_times
325324_green " 脚本当天运行次数:${TODAY} ,累计运行次数:${TOTAL} "
326325check_update
327326if ! command -v sudo > /dev/null 2>&1 ; then
You can’t perform that action at this time.
0 commit comments