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

Commit

Permalink
Landrash sudo (#7)
Browse files Browse the repository at this point in the history
Adds `sudo` check
  • Loading branch information
Landrash committed Feb 3, 2017
1 parent 82b031f commit 2ac0ad1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions install_mosquitto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ echo "Modified by Landrash for use with Hassbian."
echo "Copyright(c) 2016 Dale Higgs <https://gitter.im/dale3h>"
echo

if [ "$(id -u)" != "0" ]; then
echo "This script must be run with sudo. Use \"sudo ${0} ${*}\"" 1>&2
exit 1
fi

echo "Adding mosquitto user"
adduser mosquitto --system --group

Expand Down
6 changes: 5 additions & 1 deletion install_openzwave.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
#!/bin/bash


echo
echo "Open Z-Wave Installer for Hassbian"
echo "Modified by Landrash for use with Hassbian."
echo "Copyright(c) 2016 Dale Higgs <https://gitter.im/dale3h>"
echo

if [ "$(id -u)" != "0" ]; then
echo "This script must be run with sudo. Use \"sudo ${0} ${*}\"" 1>&2
exit 1
fi

echo "Running apt-get preparation"
apt-get update
apt-get upgrade -y
Expand Down

0 comments on commit 2ac0ad1

Please sign in to comment.