-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathupgrade
executable file
·33 lines (27 loc) · 937 Bytes
/
upgrade
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
#!/bin/sh
# Remove raspberrypi module if installed (by git)
if [ -f /var/www/emoncms/Modules/raspberrypi/raspberrypi_run.php ] ; then
{
echo "removing emoncms raspberrypi module"
sudo service rfm12piphp stop
sudo rm /etc/init.d/rfm12piphp
sudo update-rc.d -f rfm12piphp remove
sudo rm -r /var/www/emoncms/Modules/raspberrypi
}
fi
# Remove emoncms-module-rfm12pi package if installed (by debian)
if [ -f /usr/share/emoncms/www/Modules/raspberrypi/raspberrypi_run.php ] ; then
{
echo "removing emoncms-module-rfm12pi package"
sudo service rfm12piphp stop
sudo apt-get --force-yes remove emoncms-module-rfm12pi
}
fi
# if emonhub is not already installed then install now
if [ -f /etc/init.d/emonhub ] ; then
{
echo "emonHub is already installed, exiting without installing"
exit
}
fi
~/dev-emonhub/install