aboutsummaryrefslogtreecommitdiff
path: root/files/airsonic-download
blob: 4cce24a01588f208edeabcb7132f4f22eb669f28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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