Skip to content

Commit

Permalink
1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gooaclok819 committed Oct 24, 2024
1 parent cb44ad0 commit 432b807
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions menu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function Select {
echo "5. 查看运行目录"
echo "6. 修改端口"
echo "7. 更新"
echo "8. 重置账号密码"
echo "0. 退出"
echo -n "请选择一个选项: "
read option
Expand Down Expand Up @@ -138,6 +139,22 @@ function Select {
Up
fi
;;
8)
systemctl stop sublink
read -p "请输入新的账号: " User
read -p "请输入新的密码: " Password
# 运行二进制文件并传递启动参数,放在后台运行
/usr/local/bin/sublink/sublink -setting -username "$User" -password "$Password" &
# 获取该程序的PID
pid=$!
# 等待程序完成
wait $pid
# 如果需要可以在此处进行清理
echo "新的账号: $User"
echo "新的密码: $Password"
systemctl daemon-reload
systemctl start sublink
;;
0)
exit 0
;;
Expand Down

0 comments on commit 432b807

Please sign in to comment.