~修复首次创建自定义任务时的意外报错
~调整条件任务-启动前执行的执行顺位
~修复旧版本升级时创建用户的报错
~修复保守模式部分极端情况下开机自启的相关问题
This commit is contained in:
juewuy
2024-01-26 15:30:07 +08:00
parent b1358563ee
commit 395833f329
7 changed files with 14 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright (C) Juewuy
version=1.8.8f
version=1.8.8g
setdir(){
dir_avail(){
@@ -160,13 +160,13 @@ else
[ -w /etc/systemd/system ] && sysdir=/etc/systemd/system
if [ -n "$sysdir" -a "$USER" = "root" -a "$(cat /proc/1/comm)" = "systemd" ];then
#创建shellcrash用户并赋予root权限
sed -i '/0:7890/d' /etc/passwd
if type userdel useradd groupmod; then
userdel shellcrash 2>/dev/null
useradd shellcrash -u 7890 2>/dev/null
groupmod shellcrash -g 7890
groupmod shellcrash -g 7890 2>/dev/null
sed -Ei s/7890:7890/0:7890/g /etc/passwd
else
sed -i '/0:7890/d' /etc/passwd
echo "shellcrash:x:0:7890::/home/shellcrash:/bin/sh" >> /etc/passwd
fi
#配置systemd