try with latest file

This commit is contained in:
CanbiZ 2025-03-11 12:10:27 +01:00 committed by GitHub
parent fea11724a4
commit fd90158d9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -18,6 +18,7 @@ $STD apt-get install -y \
sudo \ sudo \
mc \ mc \
wget \ wget \
xmlstarlet \
expect expect
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
@ -93,10 +94,17 @@ useradd seafile
mkdir -p /home/seafile mkdir -p /home/seafile
chown seafile: /home/seafile chown seafile: /home/seafile
chown seafile: /opt/seafile chown seafile: /opt/seafile
$STD su - seafile -c "wget -qc https://s3.eu-central-1.amazonaws.com/download.seadrive.org/seafile-server_11.0.13_x86-64.tar.gz" #!/bin/bash
$STD su - seafile -c "tar -xzf seafile-server_11.0.13_x86-64.tar.gz -C /opt/seafile/" LATEST_FILE=$(curl -s "https://download.seadrive.org/" | \
xmlstarlet sel -N s3="http://s3.amazonaws.com/doc/2006-03-01/" \
-t -m "//s3:Contents[s3:Key[starts-with(text(),'seafile-server')]]" \
-v "s3:LastModified" -o " " -v "s3:Key" -n | \
sort -r | head -n1 | awk '{print $2}')
$STD su - seafile -c "wget -qc https://s3.eu-central-1.amazonaws.com/download.seadrive.org/$LATEST_FILE"
$STD su - seafile -c "tar -xzf $LATEST_FILE -C /opt/seafile/"
$STD su - seafile -c "expect <<EOF $STD su - seafile -c "expect <<EOF
spawn bash /opt/seafile/seafile-server-11.0.13/setup-seafile-mysql.sh spawn bash /opt/seafile/$LATEST_FILE/setup-seafile-mysql.sh
expect { expect {
\"Press ENTER to continue\" { \"Press ENTER to continue\" {
send \"\r\" send \"\r\"