Skip to content

Commit

Permalink
installer: allow specifying exact server version to install (#1485)
Browse files Browse the repository at this point in the history
* Update install-scrypted-dependencies-mac.sh

* Update install-scrypted-dependencies-linux.sh

* Update install-scrypted-dependencies-win.ps1

* Update install-scrypted-dependencies-win.ps1

* Update install-scrypted-dependencies-win.ps1

* Update install-scrypted-dependencies-win.ps1
  • Loading branch information
bjia56 authored May 26, 2024
1 parent bc71fd8 commit 72663dd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion install/local/install-scrypted-dependencies-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ echo "docker compose rm -rf"
sudo -u $SERVICE_USER docker rm -f /scrypted /scrypted-watchtower 2> /dev/null

echo "Installing Scrypted..."
RUN sudo -u $SERVICE_USER npx -y scrypted@latest install-server
RUN sudo -u $SERVICE_USER npx -y scrypted@latest install-server $SCRYPTED_INSTALL_VERSION

cat > /etc/systemd/system/scrypted.service <<EOT
Expand Down
2 changes: 1 addition & 1 deletion install/local/install-scrypted-dependencies-mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ then
fi

echo "Installing Scrypted..."
RUN $NPX_PATH -y scrypted@latest install-server
RUN $NPX_PATH -y scrypted@latest install-server $SCRYPTED_INSTALL_VERSION

cat > ~/Library/LaunchAgents/app.scrypted.server.plist <<EOT
<?xml version="1.0" encoding="UTF-8"?>
Expand Down
7 changes: 6 additions & 1 deletion install/local/install-scrypted-dependencies-win.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";"
py $SCRYPTED_WINDOWS_PYTHON_VERSION -m pip install --upgrade pip
py $SCRYPTED_WINDOWS_PYTHON_VERSION -m pip install debugpy typing_extensions typing opencv-python

npx -y scrypted@latest install-server
$SCRYPTED_INSTALL_VERSION=[System.Environment]::GetEnvironmentVariable("SCRYPTED_INSTALL_VERSION","User")
if ($SCRYPTED_INSTALL_VERSION -eq $null) {
npx -y scrypted@latest install-server
} else {
npx -y scrypted@latest install-server $SCRYPTED_INSTALL_VERSION
}

$USER_HOME_ESCAPED = $env:USERPROFILE.replace('\', '\\')
$SCRYPTED_HOME = $env:USERPROFILE + '\.scrypted'
Expand Down

0 comments on commit 72663dd

Please sign in to comment.