Update install.sh for Sinch, remove expiry timer
References Sinch instead of Telnyx, removes .expires file logic since we now stop after 3 successful deliveries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f13e2036a5
commit
5676c0eec8
1 changed files with 3 additions and 13 deletions
16
install.sh
16
install.sh
|
|
@ -20,19 +20,11 @@ echo "Installing dependencies..."
|
|||
# Create directories
|
||||
mkdir -p "$SCRIPT_DIR/claims" "$SCRIPT_DIR/reports"
|
||||
|
||||
# Write expiry timestamp (7 days from now)
|
||||
if date --version >/dev/null 2>&1; then
|
||||
date -d "+7 days" "+%Y-%m-%dT%H:%M:%S" > "$SCRIPT_DIR/reports/.expires"
|
||||
else
|
||||
date -v+7d "+%Y-%m-%dT%H:%M:%S" > "$SCRIPT_DIR/reports/.expires"
|
||||
fi
|
||||
|
||||
# Check for .env
|
||||
if [ ! -f "$SCRIPT_DIR/.env" ]; then
|
||||
echo ""
|
||||
echo "WARNING: No .env file found!"
|
||||
echo " Run: python3 setup_telnyx.py"
|
||||
echo " Or: cp .env.example .env (then edit manually)"
|
||||
echo " cp .env.example .env (then edit with your Sinch credentials)"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
|
|
@ -52,15 +44,13 @@ echo "0 * * * * $PYTHON $SCRIPT_DIR/autofax.py >> $SCRIPT_DIR/reports/cron.log 2
|
|||
crontab "$TMPFILE"
|
||||
rm -f "$TMPFILE"
|
||||
|
||||
EXPIRY=$(cat "$SCRIPT_DIR/reports/.expires")
|
||||
|
||||
echo ""
|
||||
echo "=== Setup Complete ==="
|
||||
echo "Fax will be sent every hour on the hour."
|
||||
echo "Auto-expires: $EXPIRY (7 days from now)"
|
||||
echo "Stops automatically after 3 successful deliveries."
|
||||
echo ""
|
||||
echo "Checklist:"
|
||||
echo " [ ] Telnyx configured (.env file or run setup_telnyx.py)"
|
||||
echo " [ ] .env configured with Sinch credentials"
|
||||
echo " [ ] Claim PDF placed in claims/ directory"
|
||||
echo ""
|
||||
echo "Manual test: $PYTHON $SCRIPT_DIR/autofax.py"
|
||||
|
|
|
|||
Loading…
Reference in a new issue