Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
pb66 committed Oct 20, 2014
1 parent e674c8e commit 13dee46
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions install
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
#!/bin/sh

cd/~

### set git cloned location
GIT_PATH=/home/pi/emonhub
GIT_PATH=~/emonhub

### set location to install emonhub.py etc
INST_PATH=/usr/share/emonhub

### set private emonhub.conf location
CONF_PATH=/home/pi

### clone emonhub
git clone https://github.com/emonhub/emonhub.git
git clone https://github.com/emonhub/emonhub.git $GIT_PATH

### switch to development branch
cd emonhub
cd $GIT_PATH
git checkout development
cd ../
cd $OLDPWD

### create linked directory for emonhub.py etc
sudo rm -r -f $INST_PATH
Expand All @@ -31,10 +26,13 @@ sudo ln -s $GIT_PATH/service/emonhub /etc/init.d/emonhub
sudo rm -f /etc/default/emonhub
sudo ln -s $GIT_PATH/conf/default/emonhub /etc/default/emonhub

### create folder and link for settings file
sudo mkdir -p /etc/emonhub
sudo rm -f /etc/emonhub/emonhub.conf
sudo ln -s $GIT_PATH/conf/emonhub.conf /etc/emonhub/emonhub.conf
### create folder and move settings file (unless it exists already)
if [ ! -f /etc/emonhub/emonhub.conf ] ; then
{
sudo mkdir -p /etc/emonhub
sudo mv $GIT_PATH/conf/emonhub.conf /etc/emonhub/emonhub.conf
}
fi

# launch at start-ip
sudo update-rc.d emonhub defaults 99
Expand All @@ -49,4 +47,4 @@ sudo useradd -M -r -G dialout,tty -c "emonHub user" emonhub
sudo service emonhub restart

### delete install script
sudo rm -r dev-emonhub
sudo rm -r ~/dev-emonhub

0 comments on commit 13dee46

Please sign in to comment.