mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-12 16:31:25 +00:00
~继续优化代码
~bot_tg.sh施工中
This commit is contained in:
16
scripts/libs/check_autostart.sh
Normal file
16
scripts/libs/check_autostart.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
check_autostart(){
|
||||
if [ "$start_old" = "已开启" ];then
|
||||
[ ! -f "$CRASHDIR"/.dis_startup ] && return 0
|
||||
elif [ -f /etc/rc.common -a "$(cat /proc/1/comm)" = "procd" ]; then
|
||||
[ -n "$(find /etc/rc.d -name '*shellcrash')" ] && return 0
|
||||
elif ckcmd systemctl; then
|
||||
[ "$(systemctl is-enabled shellcrash.service 2>&1)" = enabled ] && return 0
|
||||
elif grep -q 's6' /proc/1/comm; then
|
||||
[ -f /etc/s6-overlay/s6-rc.d/user/contents.d/afstart ] && return 0
|
||||
elif rc-status -r >/dev/null 2>&1; then
|
||||
rc-update show default | grep -q "shellcrash" && return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
Reference in New Issue
Block a user