]> littlesong.place Git - littlesongplace.git/commitdiff
Fix service name
authorChris Fulljames <christianfulljames@gmail.com>
Mon, 19 Jan 2026 19:03:48 +0000 (14:03 -0500)
committerChris Fulljames <christianfulljames@gmail.com>
Mon, 19 Jan 2026 19:03:48 +0000 (14:03 -0500)
.githooks/post-receive

index 1e97da062503d907da69777df29f115936e5e682..88abcb71e5369aac3dae557c5077a4ef8ba5bcc1 100755 (executable)
@@ -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