1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-28 13:15:12 +01:00
bitwarden-server/scripts/run.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

46 lines
1.3 KiB
Bash
Raw Permalink Normal View History

2017-08-23 22:15:42 +02:00
#!/usr/bin/env bash
set -e
2022-03-01 22:19:09 +01:00
cat << "EOF"
_ _ _ _
| |__ (_) |___ ____ _ _ __ __| | ___ _ __
| '_ \| | __\ \ /\ / / _` | '__/ _` |/ _ \ '_ \
| |_) | | |_ \ V V / (_| | | | (_| | __/ | | |
|_.__/|_|\__| \_/\_/ \__,_|_| \__,_|\___|_| |_|
EOF
cat << EOF
Open source password management solutions
Copyright 2015-$(date +'%Y'), 8bit Solutions LLC
https://bitwarden.com, https://github.com/bitwarden
===================================================
EOF
2017-08-23 22:15:42 +02:00
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
2022-03-01 22:19:09 +01:00
BITWARDEN_SCRIPT_URL="https://go.btwrdn.co/bw-sh"
2017-08-23 22:15:42 +02:00
2022-03-01 22:19:09 +01:00
cd $DIR
cd ../../
2017-10-25 23:21:35 +02:00
2022-03-01 22:19:09 +01:00
FOUND=false
2022-03-01 22:19:09 +01:00
for i in *.sh; do
if [ $i = "bitwarden.sh" ]
then
FOUND=true
if curl -L -s -w "http_code %{http_code}" -o bitwarden.sh.1 $BITWARDEN_SCRIPT_URL | grep -q "^http_code 20[0-9]"
then
2022-03-01 22:19:09 +01:00
mv bitwarden.sh.1 bitwarden.sh
chmod u+x bitwarden.sh
echo "We have moved our self-hosted scripts to their own repository (https://github.com/bitwarden/self-host). Your 'bitwarden.sh' script has been automatically upgraded. Please run it again."
else
2022-03-01 22:19:09 +01:00
rm -f bitwarden.sh.1
fi
2022-03-01 22:19:09 +01:00
fi
done
2020-06-17 15:05:35 +02:00
2022-03-01 22:19:09 +01:00
if [ $FOUND = false ]
then
echo "We have moved our self-hosted scripts to their own repository (https://github.com/bitwarden/self-host). Please run 'bitwarden.sh updateself' before updating."
fi