#!/bin/sh
-# Copyright (c) 2023 Jakub Czajka <jakub@ekhem.eu.org>
+# Copyright (c) 2023-2024 Jakub Czajka <jakub@ekhem.eu.org>
# License: GPL-3.0 or later.
. /etc/environment
}
python3 -u -m gdrive_knife auth \
- --credentials ${gdrive_credentials} \
- --token ${gdrive_auth_token} \
- --on_success https://drive.${private_domain} \
- --on_token https://drive.${private_domain}/auth \
- --port 3030 \
+ --credentials ${gdrive_credentials} \
+ --token ${gdrive_auth_token} \
+ --on_success https://drive.${private_domain} \
+ --on_token https://drive.${private_domain}/auth \
+ --port 3030 \
| while read -r line
do
case "${line}" in
echo "HTTP/1.1 403 Forbidden"
echo "Content-Type: text/html"
echo ""
- echo "<body>$(with_hyperlink "${line}")</body>"
+ echo "<body>$(with_hyperlink "${line}")</body>"
exit 1
;;
*"Authentication URL"*)
echo "HTTP/1.1 307 Temporary Redirect"
- echo "Location: $(echo ${line} | sed 's/^.*\s//')"
- echo ""
- ;;
+ echo "Location: $(echo ${line} | sed 's/^.*\s//')"
+ echo ""
+ ;;
esac
done