From b16ec40694bd93c78df0d35153acd4f0c13ad4ab Mon Sep 17 00:00:00 2001 From: Ibraheem Saleh Date: Sun, 11 Jan 2026 21:48:26 -0800 Subject: [PATCH] final final production configs --- aliases.bash | 5 +++++ config.json | 4 ++-- harbor-bot.service | 17 +++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 aliases.bash create mode 100644 harbor-bot.service diff --git a/aliases.bash b/aliases.bash new file mode 100644 index 0000000..687a1b1 --- /dev/null +++ b/aliases.bash @@ -0,0 +1,5 @@ +alias HARBORBOT_RESTART="sudo systemctl daemon-reload;sudo systemctl restart harbor-bot" +alias HARBORBOT_LOGS="sudo journalctl -u harbor-bot -f" +alias HARBORBOT_STOP="sudo systemctl stop harbor-bot" +alias HARBORBOT_START="sudo systemctl start harbor-bot" +alias HARBORBOT_STATUS="sudo systemctl status harbor-bot" diff --git a/config.json b/config.json index c73de51..e2ad64b 100644 --- a/config.json +++ b/config.json @@ -56,8 +56,8 @@ {"Time": "06:30:00-08:00", "Attempts": 2, "DelaySeconds": 10}, {"Time": "06:55:00-08:00", "Attempts": 2, "DelaySeconds": 10}, {"Time": "07:00:00-08:00", "Attempts": 1, "DelaySeconds": 0}, - {"Time": "07:01:00-08:00", "Attempts": 2, "DelaySeconds": 10}, - {"Time": "07:02:00-08:00", "Attempts": 2, "DelaySeconds": 10} + {"Time": "07:01:00-08:00", "Attempts": 2, "DelaySeconds": 10}, + {"Time": "07:02:00-08:00", "Attempts": 2, "DelaySeconds": 10} ] } ], diff --git a/harbor-bot.service b/harbor-bot.service new file mode 100644 index 0000000..da68c75 --- /dev/null +++ b/harbor-bot.service @@ -0,0 +1,17 @@ +[Unit] +Description=Harbor Bot Pickleball Reservation Service -- put in /etc/systemd/system/harbor-bot.service +After=network.target + +[Service] +Type=simple +User=pi +WorkingDirectory=/home/pi/harbor-bot +ExecStart=/usr/bin/python3 -u /home/pi/harbor-bot/harbor_bot.py --daemon --live +Restart=always +RestartSec=30 +StandardOutput=journal +StandardError=journal + +[Install] +WantedBy=multi-user.target +