Skip to content

Commit

Permalink
Fix: 依赖项名称错误的问题
Browse files Browse the repository at this point in the history
Fix: 解决了依赖项名称问题导致无法安装(主要是deb)
Remove: 移除了从未使用过的配置项
Add: 在升级脚本中新增新添加的功能
Change: 令README的措辞更合适
Add: 尝试自动解决中文乱码的问题
  • Loading branch information
MemoryShadow committed Jun 26, 2022
1 parent d7e42e8 commit bc3dcc5
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/AutoReleases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
docker exec -t ubuntuInstance chmod 644 -R ${work_path}/deb/etc/minecraftctl/*
docker exec -t ubuntuInstance chmod 755 ${work_path}/deb/etc/minecraftctl ${work_path}/deb/etc/minecraftctl/theme ${work_path}/deb/usr/sbin/minecraftctl
docker exec -t ubuntuInstance chmod 755 -R ${work_path}/deb/opt/minecraftctl ${work_path}/deb/DEBIAN
docker exec -t ubuntuInstance dpkg -b ${work_path}/deb ${work_path}/minecraftctl_${tag//v/}_i386.deb
docker exec -t ubuntuInstance dpkg -b ${work_path}/deb ${work_path}/minecraftctl_${tag//v/}_x86_64.deb
docker kill -s KILL ubuntuInstance
docker rm ubuntuInstance
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# minecraftctl

这是我的世界服务器管理工具,支持后台运行,快速下载部署(beta),启动,停止,重启,备份,恢复备份(alpha),向玩家发送消息,监控玩家消息并响应(alpha)
这是一个Minecraft服务端管理工具,支持后台运行,快速下载部署(beta),启动,停止,重启,备份,恢复备份(alpha),向玩家发送消息,监控玩家消息并响应(alpha)

此脚本用于帮助运维人员减少重复的操作,帮助他们更加轻松的工作

Expand Down Expand Up @@ -28,7 +28,7 @@

## 说明

这是我的世界服务器管理工具,支持后台运行,快速下载部署(beta),启动,停止,重启,备份,恢复备份(alpha),向玩家发送消息,监控玩家消息并响应(alpha)
这是一个Minecraft服务端管理工具,支持后台运行,快速下载部署(beta),启动,停止,重启,备份,恢复备份(alpha),向玩家发送消息,监控玩家消息并响应(alpha)

此脚本用于帮助运维人员减少重复的操作,帮助他们更加轻松的工作

Expand Down
4 changes: 4 additions & 0 deletions bin/minecraftctl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ function openEditer() {
if [ $? -eq 0 ]; then
code $1
else
# 尝试自动解决中文乱码的问题
if [ ! -e ~/.vimrc ]; then
echo "set enc=utf8">~/.vimrc
fi
vim $1
fi
}
Expand Down
6 changes: 1 addition & 5 deletions cfg/config
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,8 @@ HostProtocol=https
Insecure=false
# 是否启用第三方验证
Authlib=false
# 第三方验证的验证地址
# 第三方验证的验证服务地址
AuthlibInjector="https://littleskin.cn/api/yggdrasil"
# 第三方验证器版本
AuthlibInjectorVer="1.1.44"
# 第三方验证核心下载地址(下载过慢推荐使用代理地址:https://github.91chi.fun/)
AuthlibInjectorSoure="https://github.com/yushijinhun/authlib-injector/releases/download/v${authlib_injectorVer}/authlib-injector-${authlib_injectorVer}.jar"
# 服务器启动核心文件名(不含后缀)
MainJAR="spigot-1.18.2"
# 服务器核心,备份文件时使用,支持的值为以下列表
Expand Down
5 changes: 2 additions & 3 deletions deb/DEBIAN/control
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ Priority: extra
Essential: no
Source: minecraftctl
Architecture: amd64
Depends: screen,vim,aric2
Recommends: tar
Suggests: diatheke-tui|dialog,curl,wget
Depends: screen,vim,aria2,tar,zip,unzip
Suggests: whiptail|dialog,curl,wget
Installed-Size: 512
Maintainer: MemoryShadow[[email protected]]
Homepage: https://github.com/MemoryShadow/minecraftctl
Expand Down
23 changes: 16 additions & 7 deletions deb/DEBIAN/preinst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# 升级时保留配置信息
#*升级时保留配置信息

# 加载等待升级的配置文件
source /etc/minecraftctl/config
Expand All @@ -26,12 +26,8 @@ HostProtocol=${HostProtocol}
Insecure=${Insecure}
# 是否启用第三方验证
Authlib=${authlib:-${Authlib}}
# 第三方验证的验证地址
# 第三方验证的验证服务地址
AuthlibInjector="${authlib_injectorVer:-${AuthlibInjector}}"
# 第三方验证器版本
AuthlibInjectorVer="${authlib_injectorVer:-${AuthlibInjectorVer}}"
# 第三方验证核心下载地址(下载过慢推荐使用代理地址:https://github.91chi.fun/)
AuthlibInjectorSoure="${authlib_injectorSoure:-${AuthlibInjectorSoure}}"
# 服务器启动核心文件名(不含后缀)
MainJAR="${MainJAR}"
# 服务器核心,备份文件时使用,支持的值为以下列表
Expand All @@ -47,6 +43,19 @@ BackupThread=${BackupThread}
BackupCompressLevel=${BackupCompressLevel}
# 离开时等待的秒数(若是超过此时间服务器还没停止,就会强制杀死进程)
StopWaitTimeMax=${StopWaitTimeMax}
# minecraftctl安装路径
InstallPath="${InstallPath:-/opt/minecraftctl}"
# 配置刹车时长(秒), 避免长时间过高的CPU占用
SleepSecond=${SleepSecond:-15}
# 配置工作时长(秒)
WorkSecond=${WorkSecond:-15}
# 设置切片超时时间(秒), 如果完成切片的时间超过这个值就放弃刹车
WorkExceedSecond=${WorkExceedSecond:-50}
# 配置每个工作切片周期(行)
WorkPart=${WorkPart:-1000}
EOF
rm /etc/minecraftctl/config.bak
if [ -e /etc/minecraftctl/config.bak ]; then
rm /etc/minecraftctl/config.bak
fi
2 changes: 1 addition & 1 deletion rpm/SPECS/minecraftctl.spec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ License: GPL
URL: https://github.com/MemoryShadow/minecraftctl

Requires: bash
Requires: screen,vim,aric2
Requires: screen,vim,aria2
BuildRoot: ~/rpmbuild/

%description
Expand Down

0 comments on commit bc3dcc5

Please sign in to comment.