aboutsummaryrefslogtreecommitdiff
path: root/files/airsonic-download
diff options
context:
space:
mode:
Diffstat (limited to 'files/airsonic-download')
-rwxr-xr-xfiles/airsonic-download19
1 files changed, 19 insertions, 0 deletions
diff --git a/files/airsonic-download b/files/airsonic-download
new file mode 100755
index 0000000..4cce24a
--- /dev/null
+++ b/files/airsonic-download
@@ -0,0 +1,19 @@
+#!/bin/bash
+#
+# Download and check airsonic.
+#
+
+# Parameters
+DEST="/var/lib/airsonic/airsonic.war"
+HASH="738c0614a113f692d75f62d9a74efab1580e3ba8c683feb8d6bfded80240f342"
+
+# Download
+/usr/bin/wget https://github.com/airsonic/airsonic/releases/download/v10.1.2/airsonic.war --output-document=$DEST || exit 1
+
+# Check integrity
+if [ "`sha256sum $DEST`" != "$HASH $DEST"]; then
+ rm -f $DEST
+ exit 1
+else
+ chown airsonic:airsonic $DEST
+fi