-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmacDevInstaller.sh
58 lines (48 loc) · 1.48 KB
/
macDevInstaller.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git node
# Install Postgres
echo "Downloading Postgres.app, unzipping it, and putting it into Applications"
curl -sO "https://rise.vision/cdn/Postgres.zip"
unzip Postgres.zip
mv Postgres.app /Applications
echo "Please enter your sudo password"
sudo spctl --master-disable
open -a Postgres
sudo spctl --master-enable
# Configure Postgres
psql -U $USER -c "CREATE DATABASE rise_testnet;"
psql -U $USER -c "CREATE USER risetest WITH PASSWORD 'risetestpassword';"
psql -U $USER -c "GRANT ALL PRIVILEGES ON DATABASE rise_testnet TO risetest;"
if pgrep -x "ntpd" > /dev/null; then
echo "√ NTP is running"
else
sudo launchctl load /System/Library/LaunchDaemons/org.ntp.ntpd.plist
sleep 1
if pgrep -x "ntpd" > /dev/null; then
echo "√ NTP is running"
else
echo -e "\nNTP did not start, Please verify its configured on your system"
exit 0
fi
fi #End Darwin Checks
# Download Release
git clone https://github.com/RiseVision/rise-core.git
git fetch development
git checkout development
# Configure
echo "Installing Dependencies for Rise-Core"
cd rise-core
sudo npm install -g forever forever-service
sudo forever-service install rise-core
npm install
echo "Installing Dependencies for Web-UI"
cd public
npm install
cd ../
sudo start rise-core
echo "To check the status of rise-core run:"
echo "status rise-core"
echo ""
echo "Exiting"
exit 1