Files
lucidia-main/scripts/pull_and_restart.sh
blackboxprogramming 55dd4553f9 did you get this
2025-08-08 02:08:46 -05:00

17 lines
472 B
Bash

#!/usr/bin/env bash
set -euo pipefail
cd /opt/lucidia
git fetch --all -q
git reset --hard origin/main -q
# restart whichever unit exists
if command -v systemctl >/dev/null; then
if systemctl is-enabled --quiet lucidia.service 2>/dev/null; then
sudo systemctl restart lucidia.service
elif systemctl is-enabled --quiet codex.service 2>/dev/null; then
sudo systemctl restart codex.service
fi
fi
echo "Deploy done on $(hostname) at $(TZ=America/Chicago date)"