Skip to content
Snippets Groups Projects
Verified Commit 2575d80a authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Fix seaf-cli issues

parent d38f94cb
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash
set -Eeo pipefail
seaf-cli init -d /seafile-data
if [ -z "$OTP_TOKEN" ]; then
seaf-cli sync -l "$LIBRARY" -s "$SERVER" -d "/sync" -u "$EMAIL" -p "$PASSWORD" --tfa $(oathtool --totp -b "$OTP_TOKEN")
else
seaf-cli sync -l "$LIBRARY" -s "$SERVER" -d "/sync" -u "$EMAIL" -p "$PASSWORD"
fi
seaf-cli start
maxretry=4
retry=0
while [ "$retry" -le "$maxretry" ]; do
ps aux | grep seafile | grep -v grep > /dev/null 2> /dev/null || {
retry=$(expr $retry + 1);
}
sleep 5
done
echo "Seafile not running"
exit 1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment