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

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
FROM ubuntu:18.04
RUN apt-get update && \
apt-get install -y --no-install-recommends \
software-properties-common && \
apt-add-repository ppa:seafile/seafile-client && \
apt-get update && \
apt-get install -y --no-install-recommends \
seafile-cli \
oathtool && \
rm -rf /var/lib/apt/lists/*
ADD docker-entrypoint.sh /docker-entrypoint.sh
ENV LIBRARY=""
ENV SERVER=""
ENV EMAIL=""
ENV PASSWORD=""
ENV OTP_TOKEN=""
VOLUME /sync
ENTRYPOINT ["/docker-entrypoint.sh"]
#!/usr/bin/env bash
set -Eeo pipefail
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment