infra/notifier/deploy.sh

18 lines
757 B
Bash

#!/bin/bash
# deploy-notifier.sh -- copies refactored watcher to server
set -e
SERVER="root@100.75.128.45"
DEST="/opt/umami/notifier"
echo "Copying files..."
scp /Users/manohar_air/MyProjects/deployments/notifier/config.py $SERVER:$DEST/config.py
scp /Users/manohar_air/MyProjects/deployments/notifier/notifier.py $SERVER:$DEST/notifier.py
scp /Users/manohar_air/MyProjects/deployments/notifier/watcher.py $SERVER:$DEST/watcher.py
scp /Users/manohar_air/MyProjects/deployments/notifier/.env.example $SERVER:$DEST/.env.example
echo "Done. Now on the server:"
echo " 1. cp $DEST/.env.example $DEST/.env"
echo " 2. nano $DEST/.env (fill in secrets)"
echo " 3. chmod 600 $DEST/.env"
echo " 4. kill \$(pgrep -f watcher.py) && python3 $DEST/watcher.py &"