From 2baaf95f46db25707d69e4507576d405ec0f4168 Mon Sep 17 00:00:00 2001 From: Chris Fulljames Date: Mon, 19 Jan 2026 14:03:48 -0500 Subject: [PATCH] Fix service name --- .githooks/post-receive | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.githooks/post-receive b/.githooks/post-receive index 1e97da0..88abcb7 100755 --- a/.githooks/post-receive +++ b/.githooks/post-receive @@ -17,7 +17,8 @@ done function build_and_run { BRANCH="$1" - OUTDIR="$2" + OUTDIR="/var/www/$2" + SERVICE="$2.service" echo "Deploying $BRANCH" echo "Preparing workspace..." @@ -36,16 +37,16 @@ function build_and_run { deactivate . "${OUTDIR}/venv/bin/activate" pip install --ignore-installed ./dist/*.whl - sudo systemctl restart littlesongplace.service + sudo systemctl restart "$SERVICE" echo "Done!" } if [ "$MASTER_UPDATED" = true ]; then - build_and_run master /var/www/littlesongplace + build_and_run master littlesongplace fi if [ "$DEV_UPDATED" = true ]; then - build_and_run dev /var/www/littlesongplace-test + build_and_run dev littlesongplace-test fi -- 2.39.5