Update nexus.sh
This commit is contained in:
parent
3c65b5df2b
commit
7dbc99b4f5
10
nexus.sh
10
nexus.sh
@ -4,6 +4,16 @@
|
||||
SERVICE_NAME="nexus"
|
||||
SERVICE_FILE="/etc/systemd/system/nexus.service" # 更新服务文件路径
|
||||
|
||||
# 脚本保存路径
|
||||
SCRIPT_PATH="$HOME/nexus.sh"
|
||||
|
||||
# 检查是否以root用户运行脚本
|
||||
if [ "$(id -u)" != "0" ]; then
|
||||
echo "此脚本需要以root用户权限运行。"
|
||||
echo "请尝试使用 'sudo -i' 命令切换到root用户,然后再次运行此脚本。"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 主菜单函数
|
||||
function main_menu() {
|
||||
while true; do
|
||||
|
Loading…
Reference in New Issue
Block a user