Browse Source

rename run script to start

pull/95/head
Kyle Spearrin 8 years ago
parent
commit
712e3f3477
  1. 4
      README.md
  2. 10
      scripts/bitwarden.ps1
  3. 10
      scripts/bitwarden.sh
  4. 0
      scripts/start.ps1
  5. 0
      scripts/start.sh

4
README.md

@ -77,8 +77,8 @@ You can deploy bitwarden using Docker containers on Windows, macOS, and Linux di @@ -77,8 +77,8 @@ You can deploy bitwarden using Docker containers on Windows, macOS, and Linux di
sudo curl -s -o bitwarden.sh https://raw.githubusercontent.com/bitwarden/core/master/scripts/bitwarden.sh && chmod u+x bitwarden.sh
./bitwarden.sh install
./bitwarden.sh start
./bitwarden.sh updatedb
./bitwarden.sh run
```
### Windows
@ -87,8 +87,8 @@ sudo curl -s -o bitwarden.sh https://raw.githubusercontent.com/bitwarden/core/ma @@ -87,8 +87,8 @@ sudo curl -s -o bitwarden.sh https://raw.githubusercontent.com/bitwarden/core/ma
Invoke-RestMethod -OutFile bitwarden.ps1 -Uri https://raw.githubusercontent.com/bitwarden/core/master/scripts/bitwarden.ps1
.\bitwarden.ps1 -install
.\bitwarden.ps1 -start
.\bitwarden.ps1 -updatedb
.\bitwarden.ps1 -run
```
## Contribute

10
scripts/bitwarden.ps1

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
param (
[switch] $install,
[switch] $run,
[switch] $start,
[switch] $restart,
[switch] $stop,
[switch] $update,
@ -42,7 +42,7 @@ if(!(Test-Path -Path $scriptsDir)) { @@ -42,7 +42,7 @@ if(!(Test-Path -Path $scriptsDir)) {
}
function Download-Run-Files {
Invoke-RestMethod -OutFile $scriptsDir\run.ps1 -Uri "${githubBaseUrl}/scripts/run.ps1"
Invoke-RestMethod -OutFile $scriptsDir\start.ps1 -Uri "${githubBaseUrl}/scripts/start.ps1"
Invoke-RestMethod -OutFile $scriptsDir\stop.ps1 -Uri "${githubBaseUrl}/scripts/stop.ps1"
Invoke-RestMethod -OutFile $dockerDir\docker-compose.yml -Uri "${githubBaseUrl}/docker/docker-compose.yml"
Invoke-RestMethod -OutFile $dockerDir\docker-compose.macwin.yml ` -Uri "${githubBaseUrl}/docker/docker-compose.macwin.yml"
@ -54,13 +54,13 @@ if($install) { @@ -54,13 +54,13 @@ if($install) {
Invoke-RestMethod -OutFile $scriptsDir\install.ps1 ` -Uri "${githubBaseUrl}/scripts/install.ps1"
Invoke-Expression "$scriptsDir\install.ps1 -outputDir $output"
}
elseif($run -Or $restart) {
elseif($start -Or $restart) {
if(!(Test-Path -Path $dockerDir)) {
New-Item -ItemType directory -Path $dockerDir | Out-Null
Download-Run-Files
}
Invoke-Expression "$scriptsDir\run.ps1 -outputDir $output -dockerDir $dockerDir"
Invoke-Expression "$scriptsDir\start.ps1 -outputDir $output -dockerDir $dockerDir"
}
elseif($update) {
if(Test-Path -Path $dockerDir) {
@ -69,7 +69,7 @@ elseif($update) { @@ -69,7 +69,7 @@ elseif($update) {
New-Item -ItemType directory -Path $dockerDir | Out-Null
Download-Run-Files
Invoke-Expression "$scriptsDir\run.ps1 -outputDir $output -dockerDir $dockerDir"
Invoke-Expression "$scriptsDir\start.ps1 -outputDir $output -dockerDir $dockerDir"
}
elseif($updatedb) {
Invoke-RestMethod -OutFile $scriptsDir\update-db.ps1 -Uri "${githubBaseUrl}/scripts/update-db.ps1"

10
scripts/bitwarden.sh

@ -45,8 +45,8 @@ then @@ -45,8 +45,8 @@ then
fi
function downloadRunFiles() {
curl -s -o $SCRIPTS_DIR/run.sh $GITHUB_BASE_URL/scripts/run.sh
chmod u+x $SCRIPTS_DIR/run.sh
curl -s -o $SCRIPTS_DIR/start.sh $GITHUB_BASE_URL/scripts/start.sh
chmod u+x $SCRIPTS_DIR/start.sh
curl -s -o $SCRIPTS_DIR/stop.sh $GITHUB_BASE_URL/scripts/stop.sh
chmod u+x $SCRIPTS_DIR/stop.sh
curl -s -o $DOCKER_DIR/docker-compose.yml $GITHUB_BASE_URL/docker/docker-compose.yml
@ -60,14 +60,14 @@ then @@ -60,14 +60,14 @@ then
curl -s -o $SCRIPTS_DIR/install.sh $GITHUB_BASE_URL/scripts/install.sh
chmod u+x $SCRIPTS_DIR/install.sh
$SCRIPTS_DIR/install.sh $OUTPUT
elif [ "$1" == "run" -o "$1" == "restart" ]
elif [ "$1" == "start" -o "$1" == "restart" ]
then
if [ ! -d "$DOCKER_DIR" ]
then
mkdir $DOCKER_DIR
downloadRunFiles
fi
$SCRIPTS_DIR/run.sh $OUTPUT $DOCKER_DIR
$SCRIPTS_DIR/start.sh $OUTPUT $DOCKER_DIR
elif [ "$1" == "update" ]
then
if [ -d "$DOCKER_DIR" ]
@ -77,7 +77,7 @@ then @@ -77,7 +77,7 @@ then
mkdir $DOCKER_DIR
downloadRunFiles
$SCRIPTS_DIR/run.sh $OUTPUT $DOCKER_DIR
$SCRIPTS_DIR/start.sh $OUTPUT $DOCKER_DIR
elif [ "$1" == "updatedb" ]
then
curl -s -o $SCRIPTS_DIR/update-db.sh $GITHUB_BASE_URL/scripts/update-db.sh

0
scripts/run.ps1 → scripts/start.ps1

0
scripts/run.sh → scripts/start.sh

Loading…
Cancel
Save