#!/bin/bash

# 克隆仓库
git clone https://git.nia.ink/unet/birdlgp

# 创建目录
sudo mkdir -p /etc/birdlg

# 移动文件
sudo mv birdlgp/bird-lgproxy-go /etc/birdlg/bird-lgproxy-go
sudo mv birdlgp/birdlgp.service /etc/systemd/system/birdlgp.service

# 赋予权限
sudo chmod 777 /etc/birdlg/*

# 启动服务并设置开机自启
sudo systemctl start birdlgp.service
sudo systemctl enable birdlgp.service

echo "Birdlgp服务已成功安装并启动。"    