From: www-data Date: Thu, 8 Aug 2019 14:35:08 +0000 (+0200) Subject: Automatically stop and start the service when deploying...w X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=4579d6b4f5b3e764c3a7c9787ed3d48840777297;p=rup.git Automatically stop and start the service when deploying...w --- 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 +