First release

This commit is contained in:
root 2018-09-29 11:23:01 +02:00
parent 90588bc8f2
commit bbf3886c7b
3 changed files with 24 additions and 22 deletions

View file

@ -5,7 +5,7 @@
# #
# (c)2018 by ON7LDS #
# #
# V1.01 #
# V1.02 #
# #
# This program changes the MMDVMHost configuration #
# file to suit the needs of NextionDriver #
@ -45,7 +45,10 @@ fi
if [[ -f "$MMDVMConfig.old" ]]; then
echo "There already is a backup file $MMDVMConfig.old"
echo " If you are sure to run the installer again, then Please remove it."
echo "This could be because NextionDriver already was installed earlier."
echo "If this is the case, there probably is no need to run this convertor."
echo "If, however, you are sure to run this convertor again,"
echo " then please rename or remove $MMDVMConfig.old."
exit 3
fi

View file

@ -8,7 +8,7 @@ This is the first release. I have tested it on some hotspots
but there are always much more situations and combinations than
the ones I tested :-)
This repository also includes the cofiguration convertor program
This repository also includes the configuration convertor program
for automatically converting the MMDVM.ini file to incorporate
NextionDriver.
You could just run it (NextionDriver_ConvertConfig) if you installed
@ -38,12 +38,7 @@ get the installer
git clone https://github.com/on7lds/NextionDriverInstaller.git
```
go to the installation program directory
```
cd NextionDriverInstaller
```
go !
```
sudo ./install.sh
sudo NextionDriverInstaller/install.sh
```

View file

@ -11,6 +11,12 @@
if [ "$(which gcc)" = "" ]; then echo "- I need gcc. Please install it." exit; fi
if [ "$(which git)" = "" ]; then echo "- I need git. Please install it." exit; fi
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" #"
if [ "$EUID" -ne 0 ]
then echo "- Please run as root (did you forget to prepend 'sudo' ?)"
exit
fi
echo "+ Getting NextionDriver ..."
cd /tmp
@ -29,8 +35,9 @@ PISTAR=$(if [ -f /etc/pistar-release ];then echo "OK"; fi)
MMDVM=$(which MMDVMHost)
BINDIR=$(echo "$MMDVM" | sed "s/MMDVMHost//")
CONFIGFILE="MMDVM.ini"
CONFIGDIR="/etc"
MMDVMSTART="service mmdvmhost restart"
CONFIGDIR="/etc/"
MMDVMSTOP="service mmdvmhost stop"
MMDVMSTART="service mmdvmhost start"
#########################################################
@ -64,8 +71,8 @@ checkversion () {
}
helpfiles () {
echo "+ Copying groups and users files"
cp /tmp/NextionDriverInstaller/groups.txt $CONFIGDIR
cp /tmp/NextionDriverInstaller/stripped.csv $CONFIGDIR
cp $DIR/groups.txt $CONFIGDIR
cp $DIR/stripped.csv $CONFIGDIR
}
herstart () {
echo -e "\n+ To test if it all works as expected,"
@ -84,17 +91,13 @@ herstart () {
}
if [ "$EUID" -ne 0 ]
then echo "- Please run as root"
exit
fi
if [ "$PISTAR" = "OK" ]; then
sudo mount -o remount,rw / ; sudo mount -o remount,rw /boot
CONFIGFILE="mmdvmhost"
CONFIGDIR="/etc/"
MMDVMSTART="service mmdvmhost restart"
MMDVMSTOP="service mmdvmhost stop"
MMDVMSTART="service mmdvmhost start"
else
echo ""
echo "- This is not a Pi-Star."
@ -122,8 +125,9 @@ fi
if [ "$ND" = "" ]; then
echo "+ No NextionDriver found, trying to install one."
compileer
service mmdvmhost stop
$MMDVMSTOP
killall -q -I MMDVMHost
cp $DIR"/mmdvmhost.service.pistar" /usr/local/sbin/mmdvmhost.service
cp NextionDriver $BINDIR
echo "+ Check version :"
NextionDriver -V
@ -132,7 +136,7 @@ if [ "$ND" = "" ]; then
echo -e "+ NextionDriver installed\n"
echo -e "+ -----------------------------------------------"
echo -e "+ We will now start the configuration program ...\n"
./NextionDriver_ConvertConfig $CONFIGDIR$CONFIGFILE
$DIR/NextionDriver_ConvertConfig $CONFIGDIR$CONFIGFILE
herstart
exit
fi
@ -147,7 +151,7 @@ echo "+ We are version $THISVERSION"
if [ $TV -gt $V ]; then
echo "+ Start Update"
compileer
service mmdvmhost stop
$MMDVMSTOP
killall -q -I MMDVMHost
cp NextionDriver $BINDIR
echo -e "\n+ Check version"