-
-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathinit_auth.sh
More file actions
executable file
·30 lines (24 loc) · 768 Bytes
/
init_auth.sh
File metadata and controls
executable file
·30 lines (24 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
echo "=========================================="
echo "Telegram Backup - Authentication Setup"
echo "=========================================="
echo
if [ ! -f .env ]; then
echo "[ERROR] .env file not found!"
echo "Please copy .env.example to .env and fill in your credentials."
exit 1
fi
mkdir -p data/backups
echo "Starting interactive authentication container..."
echo "You will be asked for your Telegram verification code."
echo
docker compose run --rm telegram-backup python -m src auth
# shellcheck disable=SC2181
if [ $? -eq 0 ]; then
echo
echo "[SUCCESS] Authentication completed!"
echo "You can now run 'docker compose up -d' to start the backup service."
else
echo
echo "[ERROR] Authentication failed."
fi