Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

cloud9: Add npm install to c9 script to make sure all packages are installed. #236

Merged
merged 4 commits into from
Feb 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion package/opt/hassbian/suites/cloud9.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,23 @@ echo "Starting Cloud9 service..."
systemctl start cloud9@homeassistant.service

echo "Checking the installation..."
ip_address=$(ifconfig | grep "inet.*broadcast" | grep -v 0.0.0.0 | awk '{print $2}')
sleep 15
validation=$(pgrep -f cloud9)
if [ ! -z "${validation}" ]; then
echo "Using fallback installation."
echo "Installing npm"
apt install -y npm

cd /opt/c9sdk || exit 1
npm install

echo "Checking the installation..."
sleep 15
fi

validation=$(pgrep -f cloud9)
if [ -z "${validation}" ]; then
ip_address=$(ifconfig | grep "inet.*broadcast" | grep -v 0.0.0.0 | awk '{print $2}')
echo
echo -e "\\e[32mInstallation done.\\e[0m"
echo "Your Cloud9 IDE is now avaiable at http://$ip_address:8181"
Expand All @@ -77,6 +91,7 @@ printf "Starting Cloud9 service...\\n"
systemctl start cloud9@homeassistant.service

echo "Checking the installation..."
sleep 15
validation=$(pgrep -f cloud9)
if [ ! -z "${validation}" ]; then
echo
Expand Down