1 if ($args.Count -lt 1) {
2 $scriptName = [Environment]::GetCommandLineArgs()[1]
3 Write-Output "Usage: $scriptName <destination>"
10 systemctl --user stop valheim-web
14 if (!(Test-Path -Path $destination)) {
15 New-Item -ItemType directory -Path $destination
18 strip target/release/valheim-web # To reduce the executable size.
19 Copy-Item target/release/valheim-web -Destination $destination
21 Copy-Item static -Destination $destination -Recurse -Force
23 # Do not overwrite the configuration.
24 if (!(Test-Path -Path $destination/conf.ron)) {
25 Copy-Item conf.ron -Destination $destination
28 systemctl --user start valheim-web