Skip to content

Commit

Permalink
Linux root用户检测
Browse files Browse the repository at this point in the history
  • Loading branch information
Mzdyl committed Jan 30, 2024
1 parent 0bdb752 commit d95f098
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions install_linux.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 检查是否为 root 用户
if [ "$(id -u)" -eq 0 ]; then
echo "错误:禁止以 root 用户执行此脚本。"
echo "请使用普通用户执行"
exit 1
fi

if [ "$GITHUB_ACTIONS" == "true" ]; then
echo "Detected GitHub Actions environment. Setting default values for non-interactive mode."
pluginsDir="/opt/LiteLoader/plugins"
Expand Down

0 comments on commit d95f098

Please sign in to comment.