From 4579d6b4f5b3e764c3a7c9787ed3d48840777297 Mon Sep 17 00:00:00 2001 From: www-data Date: Thu, 8 Aug 2019 16:35:08 +0200 Subject: [PATCH] Automatically stop and start the service when deploying...w --- deploy.ps1 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/deploy.ps1 b/deploy.ps1 index a88318d..219d4ee 100755 --- a/deploy.ps1 +++ b/deploy.ps1 @@ -1,3 +1,12 @@ +if ($args.Count -lt 1) { + $scriptName = [Environment]::GetCommandLineArgs()[1] + echo "Usage: $scriptName " + exit 1 +} + + +systemctl --user stop www-rouleunpet.service + git pull cargo build --release @@ -16,3 +25,6 @@ Copy-Item static -Destination $destination -Recurse -Force if (!(Test-Path -Path $destination/conf.ron)) { Copy-Item conf.ron -Destination $destination } + +systemctl --user start www-rouleunpet.service + -- 2.45.2