fix: use actual names for files
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Kasper Juul Hermansen 2025-01-11 13:08:04 +01:00
parent ea6bfc9c04
commit a28a5ca6ee
Signed by: kjuulh
SSH Key Fingerprint: SHA256:RjXh0p7U6opxnfd3ga/Y9TCo18FYlHFdSpRIV72S/QM

View File

@ -8,6 +8,8 @@ APP_VERSION="latest" # or specify a version
S3_BUCKET="rust-artifacts"
BINARY_NAME="churn"
SERVICE_NAME="${APP_NAME}.service"
SERVICE_UPDATE_NAME="${APP_NAME}-update.service"
TIMER_UPDATE_NAME="${APP_NAME}-update.timer"
INSTALL_DIR="/usr/local/bin"
CONFIG_DIR="/etc/${APP_NAME}"
CHURN_DISCOVERY="https://churn.prod.kjuulh.app"
@ -82,7 +84,7 @@ WantedBy=multi-user.target
EOF
echo "Creating churn update service..."
cat > "/etc/systemd/system/${SERVICE_NAME}-update" <<EOF
cat > "/etc/systemd/system/${SERVICE_UPDATE_NAME}" <<EOF
[Unit]
Description=Daily Churn Update Service
After=network-online.target
@ -97,7 +99,7 @@ User=root
WantedBy=multi-user.target
EOF
cat > "/etc/systemd/system/${SERVICE_NAME}-update.timer" <<EOF
cat > "/etc/systemd/system/${TIMER_UPDATE_NAME}" <<EOF
[Unit]
Description=Run Churn Update Daily
@ -116,10 +118,10 @@ systemctl daemon-reload
systemctl enable "${SERVICE_NAME}"
systemctl start "${SERVICE_NAME}"
systemctl enable "${SERVICE_NAME}-update"
systemctl enable "${SERVICE_UPDATE_NAME}"
systemctl enable "${SERVICE_NAME}-update.timer"
systemctl start "${SERVICE_NAME}-update.timer"
systemctl enable "${TIMER_UPDATE_NAME}"
systemctl start "${TIMER_UPDATE_NAME}"
# Check service status
if systemctl is-active --quiet "${SERVICE_NAME}"; then