Skip to content

Commit 888e286

Browse files
EricEric
authored andcommitted
v0.2.0
1 parent f37d895 commit 888e286

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<img alt="MudPi Smart Garden" title="MudPi Smart Garden" src="https://mudpi.app/img/mudPI_LOGO_small_flat.png" width="100px">
22

33
# MudPi Installer
4-
> A guided installation to download and setup MudPi on a RaspberryPi
4+
> A guided installation tool to download and setup MudPi on a RaspberryPi
55
6-
MudPi Installer is a bash script to help download, install and configure everything needed to get MudPi running. You will be guided through installing [MudPi Core](https://github.com/mudpi/mudpi-core), [MudPi Assistant (Optional)](https://github.com/mudpi/assistant) and [MudPi UI (Optional)](https://github.com/mudpi/ui). The installer will run all the [manual installation](docs/MANUAL_INSTALL.md) tasks and take a several minutes to complete (especially on older models).
6+
MudPi Installer is a tool to help download, install and configure everything needed to get MudPi running. You will be guided through installing [MudPi Core](https://github.com/mudpi/mudpi-core), [MudPi Assistant (Optional)](https://github.com/mudpi/assistant) and [MudPi UI (Optional)](https://github.com/mudpi/ui). The installer will run all the [manual installation](docs/MANUAL_INSTALL.md) tasks and take a several minutes to complete (especially on older models).
77

88
## Prerequisites
99
MudPi will install most of the needed prerequisites however you will need a few things beforehand.

docs/MANUAL_INSTALL.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ Install composer
6868
sudo wget https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer -O - -q | sudo php -- --quiet --install-dir=/usr/local/bin --filename=composer
6969
```
7070

71+
Install redis and change config to allow systemd to manage it
72+
```
73+
sudo apt install redis-server
74+
sudo sed -i 's/supervised no/supervised systemd/g' /etc/redis/redis.conf
75+
sudo systemctl restart redis
76+
```
77+
7178
Move old installer files if there are any
7279
```
7380
sudo mv /etc/mudpi/installer "/etc/mudpi/installer.`date +%F-%R`"

install.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ function installDependencies()
188188
sudo wget https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer -O - -q | sudo php -- --quiet --install-dir=/usr/local/bin --filename=composer || log_error "Problem installing composer"
189189
fi
190190
rm composer-setup.php
191+
sudo apt install redis-server || log_error "Unable to install redis"
192+
sudo sed -i 's/supervised no/supervised systemd/g' /etc/redis/redis.conf || log_error "Unable to update /etc/redis/redis.conf"
193+
sudo systemctl restart redis || log_error "Unable to restart redis"
191194
}
192195

193196
function askNginxInstall() {
@@ -390,6 +393,11 @@ function backupConfigs()
390393
sudo cp /etc/sudoers "$mudpi_dir/backups/sudoers.`date +%F-%R`"
391394
sudo ln -sf "$mudpi_dir/backups/sudoers.`date +%F-%R`" "$mudpi_dir/backups/sudoers"
392395
fi
396+
397+
if [ -f /etc/redis/redis.conf ]; then
398+
sudo cp /etc/redis/redis.conf "$mudpi_dir/backups/redis.conf.`date +%F-%R`"
399+
sudo ln -sf "$mudpi_dir/backups/redis.conf.`date +%F-%R`" "$mudpi_dir/backups/redis.conf"
400+
fi
393401

394402
if [ -d /etc/nginx ]; then
395403
sudo tar -czf "$mudpi_dir/backups/nginx.`date +%F-%R`.tar.gz" "/etc/nginx/sites-available"

0 commit comments

Comments
 (0)