瀏覽代碼

Add update_navidrome.sh & update_slskd.sh

poesty 1 年之前
父節點
當前提交
094e4eda47
共有 5 個文件被更改,包括 30 次插入4 次删除
  1. 1 1
      update/update_alist.sh
  2. 1 1
      update/update_librex.sh
  3. 2 2
      update/update_miniflux.sh
  4. 13 0
      update/update_navidrome.sh
  5. 13 0
      update/update_slskd.sh

+ 1 - 1
update/update_alist.sh

@@ -5,4 +5,4 @@ if [ "$current_version" != "$latest_version" ]; then
 	curl -fsSL "https://alist.nn.ci/v3.sh" | bash -s update
 else
 	echo "Up-to-date"
-fi
+fi

+ 1 - 1
update/update_librex.sh

@@ -6,4 +6,4 @@ if [ -n "$(git diff @ @{u})" ]; then
   lftp -c "set sftp:auto-confirm yes; open sftp://[REDACTED]; mirror -Rev ./ [REMOTE]/ --only-newer --parallel=10 -X .htaccess -X config.php -X opensearch.xml -X robots.txt"
 else
   echo "Up-to-date"
-fi
+fi

+ 2 - 2
update/update_miniflux.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 export DATABASE_URL=""
 ./miniflux -flush-sessions
-wget `curl -s https://api.github.com/repos/miniflux/v2/releases/latest | grep 'browser_download_url.*miniflux-linux-amd64' | cut -d '"' -f 4`
+wget `curl -s https://api.github.com/repos/miniflux/v2/releases/latest | grep 'browser_download_url.*linux-amd64' | cut -d '"' -f 4`
 mv miniflux-linux-amd64 miniflux
 chmod +x miniflux
-./miniflux -migrate
+./miniflux -migrate

+ 13 - 0
update/update_navidrome.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+current_version=v`/opt/navidrome/navidrome -v | cut -d ' ' -f 1`
+latest_version=`curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | grep 'tag_name' | cut -d '"' -f 4`
+if [ "$current_version" != "$latest_version" ]; then
+	systemctl stop navidrome.service
+	wget `curl -s https://api.github.com/repos/navidrome/navidrome/releases/latest | grep 'browser_download_url.*Linux_x86_64' | cut -d '"' -f 4` -O /tmp/Navidrome.tar.gz
+	tar -xvzf /tmp/Navidrome.tar.gz -C /opt/navidrome/
+	rm /tmp/Navidrome.tar.gz
+	# user permissions or whatever
+	systemctl start navidrome.service
+else
+	echo "Up-to-date"
+fi

+ 13 - 0
update/update_slskd.sh

@@ -0,0 +1,13 @@
+#!/bin/bash
+current_version=`/opt/slskd/slskd -v | cut -d '+' -f 1`
+latest_version=`curl -s https://api.github.com/repos/slskd/slskd/releases/latest | grep 'tag_name' | cut -d '"' -f 4`
+if [[ $current_version =~ $latest_version ]]; then
+	echo "Up-to-date"
+else
+	systemctl stop slskd.service
+	wget `curl -s https://api.github.com/repos/slskd/slskd/releases/latest | grep 'browser_download_url.*linux-x64' | cut -d '"' -f 4` -O /tmp/slskd.zip
+	unzip -o /tmp/slskd.zip -d /opt/slskd
+	rm /tmp/slskd.zip
+	# user permissions or whatever
+	systemctl start slskd.service
+fi