Update Artela.sh
This commit is contained in:
parent
115783a18f
commit
f358e190e8
@ -82,6 +82,7 @@ function install_node() {
|
|||||||
sudo rm -rf /usr/local/go
|
sudo rm -rf /usr/local/go
|
||||||
curl -L https://go.dev/dl/go1.22.0.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
|
curl -L https://go.dev/dl/go1.22.0.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
|
||||||
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile
|
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile
|
||||||
|
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
|
||||||
source $HOME/.bash_profile
|
source $HOME/.bash_profile
|
||||||
|
|
||||||
# 安装所有二进制文件
|
# 安装所有二进制文件
|
||||||
@ -105,7 +106,7 @@ function install_node() {
|
|||||||
sed -i 's|^seeds *=.*|seeds = "'$SEEDS'"|; s|^persistent_peers *=.*|persistent_peers = "'$PEERS'"|' $HOME/.artelad/config/config.toml
|
sed -i 's|^seeds *=.*|seeds = "'$SEEDS'"|; s|^persistent_peers *=.*|persistent_peers = "'$PEERS'"|' $HOME/.artelad/config/config.toml
|
||||||
|
|
||||||
# 使用 PM2 启动节点进程
|
# 使用 PM2 启动节点进程
|
||||||
pm2 start artelad --name artela-node -- start
|
pm2 start artelad --name artela-node -- start --watch
|
||||||
pm2 save
|
pm2 save
|
||||||
pm2 startup systemd
|
pm2 startup systemd
|
||||||
|
|
||||||
@ -143,15 +144,15 @@ function main_menu() {
|
|||||||
echo "2. 查看服务状态"
|
echo "2. 查看服务状态"
|
||||||
echo "3. 运行日志查询"
|
echo "3. 运行日志查询"
|
||||||
echo "4. 卸载节点"
|
echo "4. 卸载节点"
|
||||||
echo "9. 设置快捷键"
|
echo "5. 设置快捷键"
|
||||||
read -p "请输入选项(1-4, 9): " OPTION
|
read -p "请输入选项(1-5): " OPTION
|
||||||
|
|
||||||
case $OPTION in
|
case $OPTION in
|
||||||
1) install_node ;;
|
1) install_node ;;
|
||||||
2) check_service_status ;;
|
2) check_service_status ;;
|
||||||
3) view_logs ;;
|
3) view_logs ;;
|
||||||
4) uninstall_node ;;
|
4) uninstall_node ;;
|
||||||
9) check_and_set_alias ;;
|
5) check_and_set_alias ;;
|
||||||
*) echo "无效选项。" ;;
|
*) echo "无效选项。" ;;
|
||||||
esac
|
esac
|
||||||
echo "按任意键返回主菜单..."
|
echo "按任意键返回主菜单..."
|
||||||
|
Loading…
Reference in New Issue
Block a user