[Aria2] Create AriaNG service and silence unzip

This commit is contained in:
Sam Heinz
2024-04-18 17:41:47 +10:00
parent 36c89df41f
commit 52f96860a6
2 changed files with 9 additions and 6 deletions
+4 -3
View File
@@ -32,8 +32,7 @@ if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
cd /root
mkdir -p /var/www
wget -q "$(curl -s https://api.github.com/repos/mayswind/ariang/releases/latest | grep download | grep AllInOne.zip | cut -d\" -f4)" -O /root/ariang.zip
unzip "$(ls -l /root | grep zip$ | awk '{print $9}')" -d /var/www
service_path="/etc/systemd/system/ariang.service"
$STD unzip "$(ls -l /root | grep zip$ | awk '{print $9}')" -d /var/www
cat <<EOF >/etc/nginx/conf.d/ariang.conf
server {
listen 6880 default_server;
@@ -50,7 +49,9 @@ server {
}
EOF
rm /etc/nginx/sites-enabled/*
systemctl restart nginx
$STD systemctl disable --now nginx
$STD cp /lib/systemd/system/nginx.service /lib/systemd/system/ariang.service
$STD systemctl enable --now ariang
msg_ok "Installed AriaNG"
fi