-
Notifications
You must be signed in to change notification settings - Fork 976
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add upgrade script (12.05.1 to 12.06)
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
if [[ $EUID -ne 0 ]]; then | ||
echo "Please execute Countly upgrade script with a superuser..." 1>&2 | ||
exit 1 | ||
fi | ||
|
||
echo " | ||
______ __ __ | ||
/ ____/___ __ ______ / /_/ /_ __ | ||
/ / / __ \/ / / / __ \/ __/ / / / / | ||
/ /___/ /_/ / /_/ / / / / /_/ / /_/ / | ||
\____/\____/\__,_/_/ /_/\__/_/\__, / | ||
http://count.ly/____/ | ||
" | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
#update package index | ||
apt-get update | ||
|
||
#install sendmail | ||
apt-get -y install sendmail | ||
|
||
#stop countly | ||
stop countly-supervisor | ||
|
||
#add machine IP as API IP for countly dashboard | ||
serverip="`ifconfig | sed -n 's/.*inet addr:\([0-9.]\+\)\s.*/\1/p' | grep -v 127.0.0.1`" | ||
echo "countlyCommon.READ_API_URL = \"http://$serverip/o\"" > $DIR/../frontend/express/public/javascripts/countly/countly.config.js | ||
|
||
#delete existing user from members collection | ||
mongo countly --eval "db.members.remove()" | ||
|
||
#start countly | ||
start countly-supervisor | ||
|
||
echo -e "\nVisit http://$serverip in order to setup your administrator account\n" |