Add files via upload
This commit is contained in:
parent
1a3344eeab
commit
4ab1de4fa2
298
README.md
298
README.md
|
|
@ -1,149 +1,149 @@
|
||||||
# Easy-FreeDMR-SERVER-Install
|
# Easy-FreeDMR-SERVER-Install
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
is an excerpt from the emq-TE1ws proyect, focused on new and current sysops who want to install FreeDMR easily, quickly and up-to-date.
|
is an excerpt from the emq-TE1ws proyect, focused on new and current sysops who want to install FreeDMR easily, quickly and up-to-date.
|
||||||
|
|
||||||
this shell, install FreeDMR Server and FDMR-Monitor
|
this shell, install FreeDMR Server and FDMR-Monitor
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
Shell easy auto install FreeDMR Server version Self-Service without Docker, latest original gitlab hacknix version by G7RZU Simon, with Dashboard by OA4DOA, template mods by WP3JM James & N6DOZ Rudy, Self-Service mods with Dial-TG by IU2NAF Diego and menu by HP3ICC.
|
Shell easy auto install FreeDMR Server version Self-Service without Docker, latest original gitlab hacknix version by G7RZU Simon, with Dashboard by OA4DOA, template mods by WP3JM James & N6DOZ Rudy, Self-Service mods with Dial-TG by IU2NAF Diego and menu by HP3ICC.
|
||||||
|
|
||||||
# Important note , Unofficial script to install Freedmr Server with Dashboard self-service, if you require support from the official version of the developer , refer to the original developer script :
|
# Important note , Unofficial script to install Freedmr Server with Dashboard self-service, if you require support from the official version of the developer , refer to the original developer script :
|
||||||
|
|
||||||
https://gitlab.hacknix.net/hacknix/FreeDMR/-/wikis/Installing-using-Docker-(recommended!)
|
https://gitlab.hacknix.net/hacknix/FreeDMR/-/wikis/Installing-using-Docker-(recommended!)
|
||||||
|
|
||||||
FreeDMR Server original version gitlab FreeDMR by G7RZU hacknix Simon.
|
FreeDMR Server original version gitlab FreeDMR by G7RZU hacknix Simon.
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
# Pre-Requirements
|
# Pre-Requirements
|
||||||
|
|
||||||
need have curl and sudo installed
|
need have curl and sudo installed
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
# Install
|
# Install
|
||||||
|
|
||||||
into your ssh terminal copy and paste the following link :
|
into your ssh terminal copy and paste the following link :
|
||||||
|
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install curl sudo -y
|
apt-get install curl sudo -y
|
||||||
|
|
||||||
sh -c "$(curl -fsSL https://github.com/hp3icc/Easy-FreeDMR-SERVER/raw/main/install.sh)"
|
sh -c "$(curl -fsSL https://github.com/hp3icc/Easy-FreeDMR-SERVER/raw/main/install.sh)"
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
# Menu
|
# Menu
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
At the end of the installation your freedmr server will be installed and working, a menu will be displayed that will make it easier for you to edit, restart or update your server and dashboard to future versions.
|
At the end of the installation your freedmr server will be installed and working, a menu will be displayed that will make it easier for you to edit, restart or update your server and dashboard to future versions.
|
||||||
|
|
||||||
to use the options menu, just type menu in your ssh terminal or console.
|
to use the options menu, just type menu in your ssh terminal or console.
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
# Self-Service
|
# Self-Service
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
The self-service feature, added by fellow OA4DOA Christian, allows each user to add or remove one or more static tgs from the ease of a graphical environment from the server's Dashboard.
|
The self-service feature, added by fellow OA4DOA Christian, allows each user to add or remove one or more static tgs from the ease of a graphical environment from the server's Dashboard.
|
||||||
|
|
||||||
Thanks to colleague IU2NAF Diego and the FreeDMR Italia team, they add Dial-TG compatibility and option to customize the language of the announcement voice or use CW.
|
Thanks to colleague IU2NAF Diego and the FreeDMR Italia team, they add Dial-TG compatibility and option to customize the language of the announcement voice or use CW.
|
||||||
|
|
||||||
# Self-Service database
|
# Self-Service database
|
||||||
|
|
||||||
The Self-Service function uses a local database, this database does not store private information, it only stores the callsign, id and list of static tgs, created by the same user, the password is the callsign that the hotspot has and The password is decided by the user from his hotspot in the options line, without sending a previous request, filling out a ticket, sending an email or asking someone else for authorization. The user can configure the same password for all their hotspots, repeaters or connections, or they can configure an independent password for each connected equipment. They can only use Self-Service if they have previously configured their password in the options line and their equipment or application. is connected to the server
|
The Self-Service function uses a local database, this database does not store private information, it only stores the callsign, id and list of static tgs, created by the same user, the password is the callsign that the hotspot has and The password is decided by the user from his hotspot in the options line, without sending a previous request, filling out a ticket, sending an email or asking someone else for authorization. The user can configure the same password for all their hotspots, repeaters or connections, or they can configure an independent password for each connected equipment. They can only use Self-Service if they have previously configured their password in the options line and their equipment or application. is connected to the server
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
# Self-Service username and password
|
# Self-Service username and password
|
||||||
|
|
||||||
The user will always be indicative that he has his hotspot or application connected to the server.
|
The user will always be indicative that he has his hotspot or application connected to the server.
|
||||||
|
|
||||||
the password is chosen by the user and placed in the options line as follows: " PASS=password_of user_selfservice"
|
the password is chosen by the user and placed in the options line as follows: " PASS=password_of user_selfservice"
|
||||||
|
|
||||||
Password example " abc123 " :
|
Password example " abc123 " :
|
||||||
|
|
||||||
Options=PASS=abc123
|
Options=PASS=abc123
|
||||||
|
|
||||||
<img src="https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-Docker/main/pistar.jpg" width="250" height="280"> <img src="https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-Docker/main/droidstar.jpg" width="200" height="280"> <img src="https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-Docker/main/mmdvm.jpg" width="250" height="280">
|
<img src="https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-Docker/main/pistar.jpg" width="250" height="280"> <img src="https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-Docker/main/droidstar.jpg" width="200" height="280"> <img src="https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-Docker/main/mmdvm.jpg" width="250" height="280">
|
||||||
|
|
||||||
The password must contain at least 6 characters between letters and numbers, you cannot use your callsign as a password.
|
The password must contain at least 6 characters between letters and numbers, you cannot use your callsign as a password.
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
# Server startup
|
# Server startup
|
||||||
|
|
||||||
To integrate your server to the freedmr network, you must contact the telegram group
|
To integrate your server to the freedmr network, you must contact the telegram group
|
||||||
|
|
||||||
* https://t.me/FreeDMR_Building_Server_Support
|
* https://t.me/FreeDMR_Building_Server_Support
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
# Location files config :
|
# Location files config :
|
||||||
|
|
||||||
* FreeDMR Server:
|
* FreeDMR Server:
|
||||||
|
|
||||||
/opt/FreeDMR/config/FreeDMR.cfg
|
/opt/FreeDMR/config/FreeDMR.cfg
|
||||||
|
|
||||||
* FreeDMR Rules:
|
* FreeDMR Rules:
|
||||||
|
|
||||||
/opt/FreeDMR/config/FreeDMR.cfg
|
/opt/FreeDMR/config/FreeDMR.cfg
|
||||||
|
|
||||||
* FDMR-Monitor:
|
* FDMR-Monitor:
|
||||||
|
|
||||||
/opt/FDMR-Monitor/fdmr-mon.cfg
|
/opt/FDMR-Monitor/fdmr-mon.cfg
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
# Systemctl Services :
|
# Systemctl Services :
|
||||||
|
|
||||||
* Freedmr:
|
* Freedmr:
|
||||||
|
|
||||||
freedmr.service
|
freedmr.service
|
||||||
|
|
||||||
* FreeDMR Proxy:
|
* FreeDMR Proxy:
|
||||||
|
|
||||||
proxy.service
|
proxy.service
|
||||||
|
|
||||||
* FreeDMR Parrot:
|
* FreeDMR Parrot:
|
||||||
|
|
||||||
fdmrparrot.service
|
fdmrparrot.service
|
||||||
|
|
||||||
* FDMR-Monitor:
|
* FDMR-Monitor:
|
||||||
|
|
||||||
fdmr_mon.service
|
fdmr_mon.service
|
||||||
|
|
||||||
* Web Server
|
* Web Server
|
||||||
|
|
||||||
http.server-fdmr.service
|
http.server-fdmr.service
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
# Dashboard Files
|
# Dashboard Files
|
||||||
|
|
||||||
/var/www/fdmr/
|
/var/www/fdmr/
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
||||||
# Sources :
|
# Sources :
|
||||||
|
|
||||||
* https://gitlab.hacknix.net/hacknix/FreeDMR
|
* https://gitlab.hacknix.net/hacknix/FreeDMR
|
||||||
|
|
||||||
* http://www.freedmr.uk/index.php/freedmr-server-install/
|
* http://www.freedmr.uk/index.php/freedmr-server-install/
|
||||||
|
|
||||||
* https://github.com/yuvelq/FDMR-Monitor/tree/Self_Service
|
* https://github.com/yuvelq/FDMR-Monitor/tree/Self_Service
|
||||||
|
|
||||||
* https://www.daniloaz.com/es/como-crear-un-usuario-en-mysql-mariadb-y-concederle-permisos-para-una-base-de-datos-desde-la-linea-de-comandos/
|
* https://www.daniloaz.com/es/como-crear-un-usuario-en-mysql-mariadb-y-concederle-permisos-para-una-base-de-datos-desde-la-linea-de-comandos/
|
||||||
|
|
||||||
* https://www.tecmint.com/install-lamp-debian-11/
|
* https://www.tecmint.com/install-lamp-debian-11/
|
||||||
|
|
||||||
* https://styde.net/crear-una-base-de-datos-en-mysql-mariadb/
|
* https://styde.net/crear-una-base-de-datos-en-mysql-mariadb/
|
||||||
|
|
||||||
|
|
|
||||||
392
fdmr-update.sh
392
fdmr-update.sh
|
|
@ -1,201 +1,191 @@
|
||||||
#!/bin/bash
|
cd /
|
||||||
cd /
|
variable=$(grep "SERVER_ID:" /opt/FreeDMR/config/FreeDMR.cfg | tail -c 5)
|
||||||
variable=$(grep "SERVER_ID:" /opt/FreeDMR/config/FreeDMR.cfg | tail -c 5)
|
sudo systemctl stop freedmr.service
|
||||||
sudo systemctl stop freedmr.service
|
sudo systemctl stop proxy.service
|
||||||
sudo systemctl stop proxy.service
|
sudo systemctl stop fdmrparrot.service
|
||||||
sudo systemctl stop fdmrparrot.service
|
rm -r /opt/FreeDMR
|
||||||
rm -r /opt/FreeDMR
|
cd /opt
|
||||||
cd /opt
|
git clone https://gitlab.hacknix.net/hacknix/FreeDMR.git
|
||||||
git clone https://gitlab.hacknix.net/hacknix/FreeDMR.git
|
#git clone https://github.com/hp3icc/FreeDMR.git
|
||||||
cd FreeDMR
|
cd FreeDMR
|
||||||
mkdir config
|
mkdir config
|
||||||
mkdir /var/log/FreeDMR
|
mkdir /var/log/FreeDMR
|
||||||
chmod +x /opt/FreeDMR/install.sh
|
chmod +x /opt/FreeDMR/install.sh
|
||||||
./install.sh
|
./install.sh
|
||||||
#
|
sudo cat > /opt/conf.txt <<- "EOF"
|
||||||
cat > /usr/local/bin/cronedit.sh <<- "EOF"
|
|
||||||
cronjob_editor () {
|
[D-APRS]
|
||||||
# usage: cronjob_editor '<interval>' '<command>' <add|remove>
|
MODE: MASTER
|
||||||
if [[ -z "$1" ]] ;then printf " no interval specified\n" ;fi
|
ENABLED: True
|
||||||
if [[ -z "$2" ]] ;then printf " no command specified\n" ;fi
|
REPEAT: False
|
||||||
if [[ -z "$3" ]] ;then printf " no action specified\n" ;fi
|
MAX_PEERS: 1
|
||||||
if [[ "$3" == add ]] ;then
|
EXPORT_AMBE: False
|
||||||
# add cronjob, no duplication:
|
IP:
|
||||||
( sudo crontab -l | grep -v -F -w "$2" ; echo "$1 $2" ) | sudo crontab -
|
PORT: 52555
|
||||||
elif [[ "$3" == remove ]] ;then
|
PASSPHRASE:
|
||||||
# remove cronjob:
|
GROUP_HANGTIME: 0
|
||||||
( sudo crontab -l | grep -v -F -w "$2" ) | sudo crontab -
|
USE_ACL: True
|
||||||
fi
|
REG_ACL: DENY:1
|
||||||
}
|
SUB_ACL: DENY:1
|
||||||
cronjob_editor "$1" "$2" "$3"
|
TGID_TS1_ACL: PERMIT:ALL
|
||||||
EOF
|
TGID_TS2_ACL: PERMIT:ALL
|
||||||
sudo chmod +x /usr/local/bin/cronedit.sh
|
DEFAULT_UA_TIMER: 10
|
||||||
#
|
SINGLE_MODE: False
|
||||||
sudo cat > /opt/conf.txt <<- "EOF"
|
VOICE_IDENT: False
|
||||||
|
TS1_STATIC:
|
||||||
[D-APRS]
|
TS2_STATIC:
|
||||||
MODE: MASTER
|
DEFAULT_REFLECTOR: 0
|
||||||
ENABLED: True
|
ANNOUNCEMENT_LANGUAGE: es_ES
|
||||||
REPEAT: False
|
GENERATOR: 2
|
||||||
MAX_PEERS: 1
|
ALLOW_UNREG_ID: True
|
||||||
EXPORT_AMBE: False
|
PROXY_CONTROL: False
|
||||||
IP:
|
OVERRIDE_IDENT_TG:
|
||||||
PORT: 52555
|
|
||||||
PASSPHRASE:
|
[EchoTest]
|
||||||
GROUP_HANGTIME: 0
|
MODE: PEER
|
||||||
USE_ACL: True
|
ENABLED: True
|
||||||
REG_ACL: DENY:1
|
LOOSE: True
|
||||||
SUB_ACL: DENY:1
|
EXPORT_AMBE: False
|
||||||
TGID_TS1_ACL: PERMIT:ALL
|
IP:
|
||||||
TGID_TS2_ACL: PERMIT:ALL
|
#127.0.0.1
|
||||||
DEFAULT_UA_TIMER: 10
|
PORT: 49060
|
||||||
SINGLE_MODE: False
|
MASTER_IP: 127.0.0.1
|
||||||
VOICE_IDENT: False
|
MASTER_PORT: 49061
|
||||||
TS1_STATIC:
|
PASSPHRASE: passw0rd
|
||||||
TS2_STATIC:
|
CALLSIGN: ECHOTEST
|
||||||
DEFAULT_REFLECTOR: 0
|
RADIO_ID: 9990
|
||||||
ANNOUNCEMENT_LANGUAGE: es_ES
|
RX_FREQ: 449000000
|
||||||
GENERATOR: 2
|
TX_FREQ: 444000000
|
||||||
ALLOW_UNREG_ID: True
|
TX_POWER: 25
|
||||||
PROXY_CONTROL: False
|
COLORCODE: 1
|
||||||
OVERRIDE_IDENT_TG:
|
SLOTS: 3
|
||||||
|
LATITUDE: 38.0000
|
||||||
[EchoTest]
|
LONGITUDE: -095.0000
|
||||||
MODE: PEER
|
HEIGHT: 75
|
||||||
ENABLED: True
|
LOCATION: Local Parrot
|
||||||
LOOSE: True
|
DESCRIPTION: This is a cool repeater
|
||||||
EXPORT_AMBE: False
|
URL: www.w1abc.org
|
||||||
IP:
|
SOFTWARE_ID: 20170620
|
||||||
#127.0.0.1
|
PACKAGE_ID: MMDVM_HBlink
|
||||||
PORT: 49060
|
GROUP_HANGTIME: 3
|
||||||
MASTER_IP: 127.0.0.1
|
OPTIONS:
|
||||||
MASTER_PORT: 49061
|
#TS2=9990;DIAL=0;VOICE=0;TIMER=0
|
||||||
PASSPHRASE: passw0rd
|
USE_ACL: True
|
||||||
CALLSIGN: ECHOTEST
|
SUB_ACL: DENY:1
|
||||||
RADIO_ID: 9990
|
TGID_TS1_ACL: DENY:ALL
|
||||||
RX_FREQ: 449000000
|
TGID_TS2_ACL: PERMIT:9990
|
||||||
TX_FREQ: 444000000
|
TS1_STATIC:
|
||||||
TX_POWER: 25
|
TS2_STATIC:9990
|
||||||
COLORCODE: 1
|
DEFAULT_REFLECTOR: 0
|
||||||
SLOTS: 3
|
ANNOUNCEMENT_LANGUAGE: en_GB
|
||||||
LATITUDE: 38.0000
|
GENERATOR: 0
|
||||||
LONGITUDE: -095.0000
|
DEFAULT_UA_TIMER: 999
|
||||||
HEIGHT: 75
|
SINGLE_MODE: True
|
||||||
LOCATION: Local Parrot
|
VOICE_IDENT: False
|
||||||
DESCRIPTION: This is a cool repeater
|
|
||||||
URL: www.w1abc.org
|
EOF
|
||||||
SOFTWARE_ID: 20170620
|
##
|
||||||
PACKAGE_ID: MMDVM_HBlink
|
sudo sed -i 's/ALLOW_NULL_PASSPHRASE: True/ALLOW_NULL_PASSPHRASE: False/' /opt/FreeDMR/FreeDMR-SAMPLE.cfg
|
||||||
GROUP_HANGTIME: 3
|
sudo sed -i 's/PASSPHRASE:/PASSPHRASE: passw0rd/' /opt/FreeDMR/FreeDMR-SAMPLE.cfg
|
||||||
OPTIONS:
|
sudo sed -i 's/ALLOW_NULL_PASSPHRASE: passw0rd False/ALLOW_NULL_PASSPHRASE: False/' /opt/FreeDMR/FreeDMR-SAMPLE.cfg
|
||||||
#TS2=9990;DIAL=0;VOICE=0;TIMER=0
|
|
||||||
USE_ACL: True
|
cp /opt/FreeDMR/FreeDMR-SAMPLE.cfg /opt/
|
||||||
SUB_ACL: DENY:1
|
cd /opt/
|
||||||
TGID_TS1_ACL: DENY:ALL
|
cat FreeDMR-SAMPLE.cfg conf.txt obp.txt >> /opt/FreeDMR/config/FreeDMR.cfg
|
||||||
TGID_TS2_ACL: PERMIT:9990
|
sudo sed -i 's/file-timed/console-timed/' /opt/FreeDMR/config/FreeDMR.cfg
|
||||||
TS1_STATIC:
|
sudo sed -i 's/INFO/DEBUG/' /opt/FreeDMR/config/FreeDMR.cfg
|
||||||
TS2_STATIC:9990
|
sudo sed -i 's/freedmr.log/\/var\/log\/FreeDMR\/FreeDMR.log/' /opt/FreeDMR/config/FreeDMR.cfg
|
||||||
DEFAULT_REFLECTOR: 0
|
sudo sed -i 's/ANNOUNCEMENT_LANGUAGE: en_GB/ANNOUNCEMENT_LANGUAGE: es_ES/' /opt/FreeDMR/config/FreeDMR.cfg
|
||||||
ANNOUNCEMENT_LANGUAGE: en_GB
|
sudo sed -i 's/VOICE_IDENT: True/VOICE_IDENT: False/' /opt/FreeDMR/config/FreeDMR.cfg
|
||||||
GENERATOR: 0
|
sudo sed -i "s/SERVER_ID: 0000/SERVER_ID: $variable/g" /opt/FreeDMR/config/FreeDMR.cfg
|
||||||
DEFAULT_UA_TIMER: 999
|
#sudo sed -i 's/REPORT_CLIENTS: 127.0.0.1/REPORT_CLIENTS: */' /opt/FreeDMR/config/FreeDMR.cfg
|
||||||
SINGLE_MODE: True
|
sudo sed -i "s/TGID_URL:/#TGID_URL:/g" /opt/FreeDMR/config/FreeDMR.cfg
|
||||||
VOICE_IDENT: False
|
sed '37 a TGID_URL: https://freedmr.cymru/talkgroups/talkgroup_ids_json.php' -i /opt/FreeDMR/config/FreeDMR.cfg
|
||||||
|
#sed '43 a TOPO_FILE: topography.json' -i /opt/FreeDMR/config/FreeDMR.cfg
|
||||||
EOF
|
rm /opt/conf.txt
|
||||||
##
|
#rm /opt/obp.txt
|
||||||
sudo sed -i 's/ALLOW_NULL_PASSPHRASE: True/ALLOW_NULL_PASSPHRASE: False/' /opt/FreeDMR/FreeDMR-SAMPLE.cfg
|
cd /opt/FreeDMR/
|
||||||
sudo sed -i 's/PASSPHRASE:/PASSPHRASE: passw0rd/' /opt/FreeDMR/FreeDMR-SAMPLE.cfg
|
mv loro.cfg /opt/FreeDMR/playback.cfg
|
||||||
sudo sed -i 's/ALLOW_NULL_PASSPHRASE: passw0rd False/ALLOW_NULL_PASSPHRASE: False/' /opt/FreeDMR/FreeDMR-SAMPLE.cfg
|
sudo sed -i 's/54915/49061/' /opt/FreeDMR/playback.cfg
|
||||||
|
#sudo sed -i "121,129d" /opt/FreeDMR/playback.cfg
|
||||||
cp /opt/FreeDMR/FreeDMR-SAMPLE.cfg /opt/FreeDMR-SAMPLE.cfg
|
######
|
||||||
cd /opt/
|
cat /opt/rules.txt >> /opt/FreeDMR/config/rules.py
|
||||||
cat FreeDMR-SAMPLE.cfg conf.txt obp.txt >> /opt/FreeDMR/config/FreeDMR.cfg
|
#sed '14 a VALIDATE_SERVER_IDS: True' -i /opt/FreeDMR/config/FreeDMR.cfg
|
||||||
sudo sed -i 's/file-timed/console-timed/' /opt/FreeDMR/config/FreeDMR.cfg
|
#sed '105 a override_ident_tg:' -i /opt/FreeDMR/config/FreeDMR.cfg
|
||||||
sudo sed -i 's/INFO/DEBUG/' /opt/FreeDMR/config/FreeDMR.cfg
|
sudo rm /opt/FreeDMR/hotspot_proxy_v2.py
|
||||||
sudo sed -i 's/freedmr.log/\/var\/log\/FreeDMR\/FreeDMR.log/' /opt/FreeDMR/config/FreeDMR.cfg
|
#sudo rm /opt/FreeDMR/proxy_db.*
|
||||||
sudo sed -i 's/ANNOUNCEMENT_LANGUAGE: en_GB/ANNOUNCEMENT_LANGUAGE: es_ES/' /opt/FreeDMR/config/FreeDMR.cfg
|
cp /opt/FDMR-Monitor/proxy/* /opt/FreeDMR/ -r
|
||||||
sudo sed -i 's/VOICE_IDENT: True/VOICE_IDENT: False/' /opt/FreeDMR/config/FreeDMR.cfg
|
#####################
|
||||||
sudo sed -i "s/SERVER_ID: 0000/SERVER_ID: $variable/g" /opt/FreeDMR/config/FreeDMR.cfg
|
sudo cat > /lib/systemd/system/freedmr.service <<- "EOF"
|
||||||
sudo sed -i "s/TGID_URL:/#TGID_URL:/g" /opt/FreeDMR/config/FreeDMR.cfg
|
[Unit]
|
||||||
sed '37 a TGID_URL: https://freedmr.cymru/talkgroups/talkgroup_ids_json.php' -i /opt/FreeDMR/config/FreeDMR.cfg
|
Description=FreeDmr
|
||||||
rm /opt/conf.txt
|
After=multi-user.target
|
||||||
cd /opt/FreeDMR/
|
|
||||||
mv loro.cfg /opt/FreeDMR/playback.cfg
|
[Service]
|
||||||
sudo sed -i 's/54915/49061/' /opt/FreeDMR/playback.cfg
|
User=root
|
||||||
######
|
Type=simple
|
||||||
cat /opt/rules.txt >> /opt/FreeDMR/config/rules.py
|
Restart=always
|
||||||
sudo rm /opt/FreeDMR/hotspot_proxy_v2.py
|
RestartSec=3
|
||||||
cp /opt/FDMR-Monitor/proxy/* /opt/FreeDMR/ -r
|
StandardOutput=null
|
||||||
#####################
|
ExecStartPre=/bin/sh -c 'until ping -c1 noip.com; do sleep 1; done;'
|
||||||
sudo cat > /lib/systemd/system/freedmr.service <<- "EOF"
|
ExecStart=/usr/bin/python3 /opt/FreeDMR/bridge_master.py -c /opt/FreeDMR/config/FreeDMR.cfg -r /opt/FreeDMR/config/rules.py
|
||||||
[Unit]
|
|
||||||
Description=FreeDmr
|
[Install]
|
||||||
After=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
||||||
[Service]
|
EOF
|
||||||
User=root
|
###
|
||||||
Type=simple
|
#
|
||||||
Restart=always
|
sudo cat > /lib/systemd/system/proxy.service <<- "EOF"
|
||||||
RestartSec=3
|
[Unit]
|
||||||
StandardOutput=null
|
Description= Proxy Service
|
||||||
ExecStartPre=/bin/sh -c 'until ping -c1 noip.com; do sleep 1; done;'
|
|
||||||
ExecStart=/usr/bin/python3 /opt/FreeDMR/bridge_master.py -c /opt/FreeDMR/config/FreeDMR.cfg -r /opt/FreeDMR/config/rules.py
|
After=multi-user.target
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
[Service]
|
||||||
|
User=root
|
||||||
EOF
|
Type=simple
|
||||||
###
|
Restart=always
|
||||||
#
|
RestartSec=3
|
||||||
sudo cat > /lib/systemd/system/proxy.service <<- "EOF"
|
StandardOutput=null
|
||||||
[Unit]
|
ExecStartPre=/bin/sh -c 'until ping -c1 noip.com; do sleep 1; done;'
|
||||||
Description= Proxy Service
|
#WorkingDirectory=/opt/FreeDMR
|
||||||
|
#ExecStart=/usr/bin/python3 /opt/FreeDMR/hotspot_proxy_v2.py
|
||||||
After=multi-user.target
|
ExecStart=/usr/bin/python3 /opt/FreeDMR/hotspot_proxy_v2.py -c /opt/FreeDMR/proxy.cfg
|
||||||
|
|
||||||
|
[Install]
|
||||||
[Service]
|
WantedBy=multi-user.target
|
||||||
User=root
|
|
||||||
Type=simple
|
EOF
|
||||||
Restart=always
|
##
|
||||||
RestartSec=3
|
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
||||||
StandardOutput=null
|
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
||||||
ExecStartPre=/bin/sh -c 'until ping -c1 noip.com; do sleep 1; done;'
|
sudo sed -i "s/\/freedmr.cfg/\/config\/FreeDMR.cfg/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
||||||
#WorkingDirectory=/opt/FreeDMR
|
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/proxy_db.py
|
||||||
#ExecStart=/usr/bin/python3 /opt/FreeDMR/hotspot_proxy_v2.py
|
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/proxy_db.py
|
||||||
ExecStart=/usr/bin/python3 /opt/FreeDMR/hotspot_proxy_v2.py -c /opt/FreeDMR/proxy.cfg
|
#
|
||||||
|
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/proxy.cfg
|
||||||
[Install]
|
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/proxy.cfg
|
||||||
WantedBy=multi-user.target
|
#sudo sed -i "56,63d" /opt/FreeDMR/config/FreeDMR.cfg
|
||||||
|
###
|
||||||
EOF
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-SERVER-Install/main/menu.sh)"
|
||||||
##
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/self/data-id-update.sh)"
|
||||||
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
data-id
|
||||||
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
sudo chmod +x /opt/FreeDMR/*.py
|
||||||
sudo sed -i "s/\/freedmr.cfg/\/config\/FreeDMR.cfg/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
sudo chmod +x /opt/FreeDMR/config/*.py
|
||||||
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/proxy_db.py
|
rm /opt/FreeDMR-SAMPLE.cfg
|
||||||
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/proxy_db.py
|
sudo chmod +x /opt/extra-1.sh
|
||||||
#
|
sudo sh /opt/extra-1.sh
|
||||||
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/proxy.cfg
|
sudo systemctl daemon-reload
|
||||||
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/proxy.cfg
|
sudo systemctl start proxy.service
|
||||||
###
|
sudo systemctl start freedmr.service
|
||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-SERVER-Install/main/menu.sh)"
|
sudo systemctl start fdmrparrot.service
|
||||||
|
sudo systemctl restart fdmr_mon.service
|
||||||
cronedit.sh '* */6 * * *' 'data-id' remove
|
# ExecStart=/usr/bin/python3 /opt/FreeDMR/bridge_master.py -c /opt/FreeDMR/config/FreeDMR.cfg -r /opt/FreeDMR/config/rules.py
|
||||||
sudo chmod +x /opt/FreeDMR/*.py
|
|
||||||
sudo chmod +x /opt/FreeDMR/config/*.py
|
# ExecStart=/usr/bin/python3 /opt/FreeDMR/playback.py -c /opt/FreeDMR/playback.cfg
|
||||||
sudo chmod +x /opt/extra-1.sh
|
|
||||||
sudo sh /opt/extra-1.sh
|
#
|
||||||
sudo systemctl daemon-reload
|
|
||||||
sudo systemctl start proxy.service
|
cd /
|
||||||
sudo systemctl start freedmr.service
|
|
||||||
sudo systemctl start fdmrparrot.service
|
|
||||||
sudo systemctl restart fdmr_mon.service
|
|
||||||
# ExecStart=/usr/bin/python3 /opt/FreeDMR/bridge_master.py -c /opt/FreeDMR/config/FreeDMR.cfg -r /opt/FreeDMR/config/rules.py
|
|
||||||
|
|
||||||
# ExecStart=/usr/bin/python3 /opt/FreeDMR/playback.py -c /opt/FreeDMR/playback.cfg
|
|
||||||
|
|
||||||
#
|
|
||||||
|
|
||||||
cd /
|
|
||||||
|
|
|
||||||
1331
install.sh
1331
install.sh
File diff suppressed because it is too large
Load Diff
96
menu.sh
96
menu.sh
|
|
@ -1,48 +1,48 @@
|
||||||
sudo cat > /bin/menu <<- "EOF"
|
sudo cat > /bin/menu <<- "EOF"
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
while : ; do
|
while : ; do
|
||||||
choix=$(whiptail --title "Raspbian Proyect HP3ICC EasyFreeDMR" --menu "move up or down with the keyboard arrows and select your option by pressing enter:" 23 56 13 \
|
choix=$(whiptail --title "Raspbian Proyect HP3ICC EasyFreeDMR" --menu "move up or down with the keyboard arrows and select your option by pressing enter:" 23 56 13 \
|
||||||
1 " Edit FreeDMR Server " \
|
1 " Edit FreeDMR Server " \
|
||||||
2 " Edit Interlink " \
|
2 " Edit Interlink " \
|
||||||
3 " Edit FDMR-Monitor " \
|
3 " Edit FDMR-Monitor " \
|
||||||
4 " Edit Port HTTP " \
|
4 " Edit Port HTTP " \
|
||||||
5 " Parrot on " \
|
5 " Parrot on " \
|
||||||
6 " Parrot off " \
|
6 " Parrot off " \
|
||||||
7 " Restart FreeDMR Server " \
|
7 " Restart FreeDMR Server " \
|
||||||
8 " Restart FDMR-Monitor " \
|
8 " Restart FDMR-Monitor " \
|
||||||
9 " Menu update " 3>&1 1>&2 2>&3)
|
9 " Menu update " 3>&1 1>&2 2>&3)
|
||||||
exitstatus=$?
|
exitstatus=$?
|
||||||
#on recupere ce choix
|
#on recupere ce choix
|
||||||
#exitstatus=$?
|
#exitstatus=$?
|
||||||
if [ $exitstatus = 0 ]; then
|
if [ $exitstatus = 0 ]; then
|
||||||
echo "Your chosen option:" $choix
|
echo "Your chosen option:" $choix
|
||||||
else
|
else
|
||||||
echo "You chose cancel."; break;
|
echo "You chose cancel."; break;
|
||||||
fi
|
fi
|
||||||
# case : action en fonction du choix
|
# case : action en fonction du choix
|
||||||
case $choix in
|
case $choix in
|
||||||
1)
|
1)
|
||||||
sudo nano /opt/FreeDMR/config/FreeDMR.cfg ;;
|
sudo nano /opt/FreeDMR/config/FreeDMR.cfg ;;
|
||||||
2)
|
2)
|
||||||
sudo nano /opt/FreeDMR/config/rules.py ;;
|
sudo nano /opt/FreeDMR/config/rules.py ;;
|
||||||
3)
|
3)
|
||||||
sudo nano /opt/FDMR-Monitor/fdmr-mon.cfg ;;
|
sudo nano /opt/FDMR-Monitor/fdmr-mon.cfg ;;
|
||||||
4)
|
4)
|
||||||
sudo nano /lib/systemd/system/http.server-fdmr.service && systemctl daemon-reload && systemctl restart http.server-fdmr.service ;;
|
sudo nano /lib/systemd/system/http.server-fdmr.service && systemctl daemon-reload && systemctl restart http.server-fdmr.service ;;
|
||||||
5)
|
5)
|
||||||
sudo systemctl stop fdmrparrot.service && sudo systemctl start fdmrparrot.service && sudo systemctl enable fdmrparrot.service ;;
|
sudo systemctl stop fdmrparrot.service && sudo systemctl start fdmrparrot.service && sudo systemctl enable fdmrparrot.service ;;
|
||||||
6)
|
6)
|
||||||
sudo systemctl stop fdmrparrot.service && sudo systemctl disable fdmrparrot.service ;;
|
sudo systemctl stop fdmrparrot.service && sudo systemctl disable fdmrparrot.service ;;
|
||||||
7)
|
7)
|
||||||
sudo systemctl stop proxy.service && sudo systemctl start proxy.service && sudo systemctl enable proxy.service && sudo systemctl stop freedmr.service && sudo systemctl start freedmr.service && sudo systemctl enable freedmr.service ;;
|
sudo systemctl stop proxy.service && sudo systemctl start proxy.service && sudo systemctl enable proxy.service && sudo systemctl stop freedmr.service && sudo systemctl start freedmr.service && sudo systemctl enable freedmr.service && cronedit.sh '* */6 * * *' 'data-id' add;;
|
||||||
8)
|
8)
|
||||||
sudo systemctl stop fdmr_mon.service && sudo rm /opt/FDMR-Monitor/sysinfo/*.rrd && sh /opt/FDMR-Monitor/sysinfo/rrd-db.sh && cronedit.sh '*/5 * * * *' 'sh /opt/FDMR-Monitor/sysinfo/graph.sh' add && cronedit.sh '*/2 * * * *' 'sh /opt/FDMR-Monitor/sysinfo/cpu.sh' add && sudo systemctl enable fdmr_mon.service && sudo systemctl restart http.server-fdmr.service && sudo systemctl enable http.server-fdmr.service && sudo systemctl start fdmr_mon.service;;
|
sudo systemctl stop fdmr_mon.service && sudo rm /opt/FDMR-Monitor/sysinfo/*.rrd && sh /opt/FDMR-Monitor/sysinfo/rrd-db.sh && cronedit.sh '*/5 * * * *' 'sh /opt/FDMR-Monitor/sysinfo/graph.sh' add && cronedit.sh '*/2 * * * *' 'sh /opt/FDMR-Monitor/sysinfo/cpu.sh' add && sudo systemctl enable fdmr_mon.service && sudo systemctl restart http.server-fdmr.service && sudo systemctl enable http.server-fdmr.service && sudo systemctl start fdmr_mon.service;;
|
||||||
9)
|
9)
|
||||||
sh -c "$(curl -fsSL https://github.com/hp3icc/Easy-FreeDMR-SERVER-Install/raw/main/update.sh)";
|
sh -c "$(curl -fsSL https://github.com/hp3icc/Easy-FreeDMR-SERVER-Install/raw/main/update.sh)";
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
exit 0
|
exit 0
|
||||||
EOF
|
EOF
|
||||||
###
|
###
|
||||||
chmod +x /bin/menu
|
chmod +x /bin/menu
|
||||||
ln -s /bin/menu /bin/MENU
|
ln -s /bin/menu /bin/MENU
|
||||||
|
|
|
||||||
|
|
@ -1,196 +1,195 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ -f "/var/www/html/tgcount.php" ];
|
if [ -f "/var/www/html/tgcount.php" ];
|
||||||
then
|
then
|
||||||
sudo systemctl stop apache2
|
sudo systemctl stop apache2
|
||||||
#echo "found file"
|
#echo "found file"
|
||||||
else
|
else
|
||||||
echo "file not found"
|
echo "file not found"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
if [ -f "/var/www/html/tgcount.php" ];
|
if [ -f "/var/www/html/tgcount.php" ];
|
||||||
then
|
then
|
||||||
sudo systemctl disable apache2
|
sudo systemctl disable apache2
|
||||||
#echo "found file"
|
#echo "found file"
|
||||||
else
|
else
|
||||||
echo "file not found"
|
echo "file not found"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
if [ -f "/var/www/html/tgcount.php" ];
|
if [ -f "/var/www/html/tgcount.php" ];
|
||||||
then
|
then
|
||||||
sudo rm /var/www/html/* -r
|
sudo rm /var/www/html/* -r
|
||||||
#echo "found file"
|
#echo "found file"
|
||||||
else
|
else
|
||||||
echo "file not found"
|
echo "file not found"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
if [ -d "/var/www/fdmr" ];
|
if [ -d "/var/www/fdmr" ];
|
||||||
then
|
then
|
||||||
sudo rm /var/www/fdmr/ -r
|
sudo rm /var/www/fdmr/ -r
|
||||||
#echo "found file"
|
#echo "found file"
|
||||||
else
|
else
|
||||||
echo "file not found"
|
echo "file not found"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
sudo systemctl stop fdmr_mon.service
|
sudo systemctl stop fdmr_mon.service
|
||||||
sudo systemctl stop proxy.service
|
sudo systemctl stop proxy.service
|
||||||
sudo systemctl stop http.server-fdmr.service
|
sudo systemctl stop http.server-fdmr.service
|
||||||
sudo rm -r /opt/FDMR-Monitor/
|
sudo rm -r /opt/FDMR-Monitor/
|
||||||
#
|
#
|
||||||
cd /opt
|
cd /opt
|
||||||
sudo git clone https://github.com/yuvelq/FDMR-Monitor.git
|
sudo git clone https://github.com/yuvelq/FDMR-Monitor.git
|
||||||
cd FDMR-Monitor
|
cd FDMR-Monitor
|
||||||
sudo git checkout Self_Service
|
sudo git checkout Self_Service
|
||||||
sudo chmod +x install.sh
|
sudo chmod +x install.sh
|
||||||
|
|
||||||
sudo sed -i 's/RELOAD_TIME = 15/RELOAD_TIME = 1/' /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
sudo sed -i 's/RELOAD_TIME = 15/RELOAD_TIME = 1/' /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
||||||
#sudo cp utils/logrotate/fdmr_mon /etc/logrotate.d/
|
#sudo cp utils/logrotate/fdmr_mon /etc/logrotate.d/
|
||||||
rm /etc/logrotate.d/fdmr_mon
|
rm /etc/logrotate.d/fdmr_mon
|
||||||
rm /lib/systemd/system/fdmr_mon.service
|
rm /lib/systemd/system/fdmr_mon.service
|
||||||
#sudo cp utils/systemd/fdmr_mon.service /lib/systemd/system/
|
#sudo cp utils/systemd/fdmr_mon.service /lib/systemd/system/
|
||||||
sudo sed -i 's/FREQUENCY = 10/FREQUENCY = 120/' /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
sudo sed -i 's/FREQUENCY = 10/FREQUENCY = 120/' /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
||||||
sudo chmod 644 /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
sudo chmod 644 /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
||||||
sed '33 a <!--' -i /opt/FDMR-Monitor/html/sysinfo.php
|
sed '33 a <!--' -i /opt/FDMR-Monitor/html/sysinfo.php
|
||||||
sed '35 a -->' -i /opt/FDMR-Monitor/html/sysinfo.php
|
sed '35 a -->' -i /opt/FDMR-Monitor/html/sysinfo.php
|
||||||
####
|
####
|
||||||
sudo sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/html/*.*
|
sudo sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/html/*.*
|
||||||
sudo sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/sysinfo/*.*
|
sudo sed -i "s/www\/html/www\/fdmr/g" /opt/FDMR-Monitor/sysinfo/*.*
|
||||||
####
|
####
|
||||||
sudo sed -i 's/localhost_2-day.png/localhost_1-day.png/' /opt/FDMR-Monitor/html/sysinfo.php
|
sudo sed -i 's/localhost_2-day.png/localhost_1-day.png/' /opt/FDMR-Monitor/html/sysinfo.php
|
||||||
sudo sed -i "s/HBMonv2/FDMR-Monitor/g" /opt/FDMR-Monitor/sysinfo/*.sh
|
sudo sed -i "s/HBMonv2/FDMR-Monitor/g" /opt/FDMR-Monitor/sysinfo/*.sh
|
||||||
sudo chmod +x /opt/FDMR-Monitor/sysinfo/cpu.sh
|
sudo chmod +x /opt/FDMR-Monitor/sysinfo/cpu.sh
|
||||||
sudo chmod +x /opt/FDMR-Monitor/sysinfo/graph.sh
|
sudo chmod +x /opt/FDMR-Monitor/sysinfo/graph.sh
|
||||||
sudo chmod +x /opt/FDMR-Monitor/sysinfo/rrd-db.sh
|
sudo chmod +x /opt/FDMR-Monitor/sysinfo/rrd-db.sh
|
||||||
|
|
||||||
#sudo chmod +x /opt/FDMR-Monitor/updateTGIDS.sh
|
#sudo chmod +x /opt/FDMR-Monitor/updateTGIDS.sh
|
||||||
#
|
#
|
||||||
sudo cat > /opt/FDMR-Monitor/html/buttons.php <<- "EOF"
|
sudo cat > /opt/FDMR-Monitor/html/buttons.php <<- "EOF"
|
||||||
<!-- HBMonitor buttons HTML code -->
|
<!-- HBMonitor buttons HTML code -->
|
||||||
<a class="button" href="index.php">Home</a>
|
<a class="button" href="index.php">Home</a>
|
||||||
|
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<button class="dropbtn">Links</button>
|
<button class="dropbtn">Links</button>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
|
|
||||||
<a class="button" href="linkedsys.php">Linked Systems</a>
|
<a class="button" href="linkedsys.php">Linked Systems</a>
|
||||||
|
|
||||||
<a class="button" href="statictg.php">Static TG</a>
|
<a class="button" href="statictg.php">Static TG</a>
|
||||||
|
|
||||||
<a class="button" href="opb.php">OpenBridge</a>
|
<a class="button" href="opb.php">OpenBridge</a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<button class="dropbtn">Self Service</button>
|
<button class="dropbtn">Self Service</button>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<?php if(!PRIVATE_NETWORK){echo '<a class="button" href="selfservice.php">SelfService</a>';}?>
|
<?php if(!PRIVATE_NETWORK){echo '<a class="button" href="selfservice.php">SelfService</a>';}?>
|
||||||
<a class="button" href="login.php">Login</a>
|
<a class="button" href="login.php">Login</a>
|
||||||
<?php
|
<?php
|
||||||
if(isset($_SESSION["auth"], $_SESSION["callsign"], $_SESSION["h_psswd"]) and $_SESSION["auth"]){
|
if(isset($_SESSION["auth"], $_SESSION["callsign"], $_SESSION["h_psswd"]) and $_SESSION["auth"]){
|
||||||
echo '<a class="button" href="devices.php">Devices</a>';
|
echo '<a class="button" href="devices.php">Devices</a>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<button class="dropbtn">Local Server</button>
|
<button class="dropbtn">Local Server</button>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<a class="button" href="moni.php"> Monitor </a>
|
<a class="button" href="moni.php"> Monitor </a>
|
||||||
|
|
||||||
<a class="button" href="sysinfo.php"> System Info </a>
|
<a class="button" href="sysinfo.php"> System Info </a>
|
||||||
|
|
||||||
<a class="button" href="log.php"> Lastheard </a>
|
<a class="button" href="log.php"> Lastheard </a>
|
||||||
|
|
||||||
<a class="button" href="tgcount.php"> TG Count </a>
|
<a class="button" href="tgcount.php"> TG Count </a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<button class="dropbtn">FreeDMR</button>
|
<button class="dropbtn">FreeDMR</button>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
|
|
||||||
<a class="button" href="http://www.freedmr.uk/index.php/why-use-freedmr/"target="_blank"> Info FreeDMR </a>
|
<a class="button" href="http://www.freedmr.uk/index.php/why-use-freedmr/"target="_blank"> Info FreeDMR </a>
|
||||||
|
|
||||||
<a class="button" href="http://www.freedmr.uk/index.php/freedmr-servers/"target="_blank"> Info Server </a>
|
<a class="button" href="http://www.freedmr.uk/index.php/freedmr-servers/"target="_blank"> Info Server </a>
|
||||||
|
|
||||||
<a class="button" href="http://www.freedmr.uk/server_test.php"target="_blank"> Status Server </a>
|
<a class="button" href="http://www.freedmr.uk/server_test.php"target="_blank"> Status Server </a>
|
||||||
|
|
||||||
<a class="button" href="http://www.freedmr.uk/index.php/world-wide-talk-groups/"target="_blank"> World Wide Talk Groups </a>
|
<a class="button" href="http://www.freedmr.uk/index.php/world-wide-talk-groups/"target="_blank"> World Wide Talk Groups </a>
|
||||||
|
|
||||||
<a class="button" href="http://www.freedmr.uk/freedmr/option-calculator-b.php"target="_blank"> Static TG Calculator </a>
|
<a class="button" href="http://www.freedmr.uk/freedmr/option-calculator-b.php"target="_blank"> Static TG Calculator </a>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--
|
<!--
|
||||||
<a class="button" href="bridges.php">Bridges</a>
|
<a class="button" href="bridges.php">Bridges</a>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Example of buttons dropdown HTML code -->
|
<!-- Example of buttons dropdown HTML code -->
|
||||||
<!--
|
<!--
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<button class="dropbtn">Admin Area</button>
|
<button class="dropbtn">Admin Area</button>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<a href="masters.php">Master&Peer</a>
|
<a href="masters.php">Master&Peer</a>
|
||||||
<a href="opb.php">OpenBridge</a>
|
<a href="opb.php">OpenBridge</a>
|
||||||
<a href="moni.php">Monitor</a>
|
<a href="moni.php">Monitor</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="dropdown">
|
<div class="dropdown">
|
||||||
<button class="dropbtn">Reflectors</button>
|
<button class="dropbtn">Reflectors</button>
|
||||||
<div class="dropdown-content">
|
<div class="dropdown-content">
|
||||||
<a target='_blank' href="#">YSF Reflector</a>
|
<a target='_blank' href="#">YSF Reflector</a>
|
||||||
<a target='_blank' href="#">XLX950</a>
|
<a target='_blank' href="#">XLX950</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
#
|
#
|
||||||
sudo chmod +x /opt/extra-2.sh
|
sudo chmod +x /opt/extra-2.sh
|
||||||
sudo sh /opt/extra-2.sh
|
sudo sh /opt/extra-2.sh
|
||||||
sudo sed -i "s/root/emqte1/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
sudo sed -i "s/root/emqte1/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
||||||
sudo sed -i "s/test/selfcare/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
sudo sed -i "s/test/selfcare/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
||||||
sudo sed -i "s/PRIVATE_NETWORK = True/PRIVATE_NETWORK = False/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
sudo sed -i "s/PRIVATE_NETWORK = True/PRIVATE_NETWORK = False/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
||||||
sudo sed -i "s/TGID_URL =/#TGID_URL =/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
sudo sed -i "s/TGID_URL =/#TGID_URL =/g" /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
||||||
sed '63 a TGID_URL = https://freedmr.cymru/talkgroups/talkgroup_ids_json.php' -i /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
sed '63 a TGID_URL = https://freedmr.cymru/talkgroups/talkgroup_ids_json.php' -i /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
||||||
sed '64 a #TGID_URL = https://freedmr.cymru/talkgroups/talkgroup_ids_flags_json.php' -i /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
sed '64 a #TGID_URL = https://freedmr.cymru/talkgroups/talkgroup_ids_flags_json.php' -i /opt/FDMR-Monitor/fdmr-mon_SAMPLE.cfg
|
||||||
sudo rm /opt/FDMR-Monitor/data/*
|
sudo rm /opt/FDMR-Monitor/data/*
|
||||||
cd /opt/FDMR-Monitor/
|
cd /opt/FDMR-Monitor/
|
||||||
sudo rm /opt/FDMR-Monitor/install.sh
|
sudo rm /opt/FDMR-Monitor/install.sh
|
||||||
wget https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/self/install.sh
|
wget https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/self/install.sh
|
||||||
chmod +x /opt/FDMR-Monitor/install.sh
|
chmod +x /opt/FDMR-Monitor/install.sh
|
||||||
#
|
#
|
||||||
sh /opt/FDMR-Monitor/install.sh
|
sh /opt/FDMR-Monitor/install.sh
|
||||||
sudo sh /opt/extra-2.sh
|
sudo sh /opt/extra-2.sh
|
||||||
#####################
|
#####################
|
||||||
sudo sed -i "s/All rights reserved.<br>.*/All rights reserved.<br><a title=\"Raspbian Proyect by HP3ICC © <?php \$cdate=date(\"Y\"); if (\$cdate > \"2018\") {\$cdate=\"2018-\".date(\"Y\");} echo \$cdate; ?>\" target=\"_blank\" href=https:\/\/github.com\/hp3icc\/Easy-FreeDMR-SERVER-Install\/>Proyect: Easy-FreeDMR-SERVER-Install<\/a><br>/g" /var/www/fdmr/*.php
|
sudo sed -i "s/All rights reserved.<br>.*/All rights reserved.<br><a title=\"Raspbian Proyect by HP3ICC © <?php \$cdate=date(\"Y\"); if (\$cdate > \"2018\") {\$cdate=\"2018-\".date(\"Y\");} echo \$cdate; ?>\" target=\"_blank\" href=https:\/\/github.com\/hp3icc\/Easy-FreeDMR-SERVER-Install\/>Proyect: Easy-FreeDMR-SERVER-Install<\/a><br>/g" /var/www/fdmr/*.php
|
||||||
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
||||||
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
||||||
sudo sed -i "s/\/freedmr.cfg/\/config\/FreeDMR.cfg/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
sudo sed -i "s/\/freedmr.cfg/\/config\/FreeDMR.cfg/g" /opt/FreeDMR/hotspot_proxy_v2.py
|
||||||
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/proxy_db.py
|
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/proxy_db.py
|
||||||
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/proxy_db.py
|
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/proxy_db.py
|
||||||
#
|
#
|
||||||
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/proxy.cfg
|
sudo sed -i "s/root/emqte1/g" /opt/FreeDMR/proxy.cfg
|
||||||
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/proxy.cfg
|
sudo sed -i "s/test/selfcare/g" /opt/FreeDMR/proxy.cfg
|
||||||
#################
|
#################
|
||||||
#sh /opt/FDMR-Monitor/sysinfo/rrd-db.sh
|
#sh /opt/FDMR-Monitor/sysinfo/rrd-db.sh
|
||||||
#rm /opt/FDMR-Monitor/sysinfo/*.rrd
|
#rm /opt/FDMR-Monitor/sysinfo/*.rrd
|
||||||
sh /opt/FDMR-Monitor/sysinfo/rrd-db.sh
|
sh /opt/FDMR-Monitor/sysinfo/rrd-db.sh
|
||||||
#sed '33 a <!--' -i /var/www/html/sysinfo.php
|
#sed '33 a <!--' -i /var/www/html/sysinfo.php
|
||||||
#sed '35 a -->' -i /var/www/html/sysinfo.php
|
#sed '35 a -->' -i /var/www/html/sysinfo.php
|
||||||
|
|
||||||
cp -r /opt/FDMR-Monitor/sysinfo/ /var/www/fdmr/sysinfo/
|
cp -r /opt/FDMR-Monitor/sysinfo/ /var/fdmr/html/sysinfo/
|
||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-SERVER-Install/main/menu.sh)"
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-SERVER-Install/main/menu.sh)"
|
||||||
#sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/self/data-id-update.sh)"
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/emq-TE1ws/main/self/data-id-update.sh)"
|
||||||
#data-id
|
data-id
|
||||||
cronedit.sh '* */6 * * *' 'data-id' remove
|
#sudo rm mon.db
|
||||||
#sudo rm mon.db
|
#sudo python3 mon_db.py
|
||||||
#sudo python3 mon_db.py
|
sudo systemctl daemon-reload
|
||||||
sudo systemctl daemon-reload
|
sudo systemctl start proxy.service
|
||||||
sudo systemctl start proxy.service
|
sudo systemctl start fdmr_mon.service
|
||||||
sudo systemctl start fdmr_mon.service
|
sudo systemctl enable fdmr_mon.service
|
||||||
sudo systemctl enable fdmr_mon.service
|
sudo systemctl start http.server-fdmr.service
|
||||||
sudo systemctl start http.server-fdmr.service
|
sudo systemctl enable http.server-fdmr.service
|
||||||
sudo systemctl enable http.server-fdmr.service
|
|
||||||
|
|
|
||||||
207
update.sh
207
update.sh
|
|
@ -1,104 +1,103 @@
|
||||||
#!/bin/bash
|
sudo cat > /bin/menu-update <<- "EOF"
|
||||||
sudo cat > /bin/menu-update <<- "EOF"
|
#!/bin/bash
|
||||||
#!/bin/bash
|
while : ; do
|
||||||
while : ; do
|
choix=$(whiptail --title "Raspbian Proyect HP3ICC / update FDMR-Monitor OA4DOA" --menu "Nota Importante: antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo todas las configuraciones, al finalizar la actualizacion el servicio se reinniciara automaticamente.
|
||||||
choix=$(whiptail --title "Raspbian Proyect HP3ICC / update FDMR-Monitor OA4DOA" --menu "Nota Importante: antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo todas las configuraciones, al finalizar la actualizacion el servicio se reinniciara automaticamente.
|
" 17 50 4 \
|
||||||
" 17 50 4 \
|
1 " Update FreeDMR " \
|
||||||
1 " Update FreeDMR " \
|
2 " Update FDMR-Monitor " \
|
||||||
2 " Update FDMR-Monitor " \
|
3 " Menu Principal " 3>&1 1>&2 2>&3)
|
||||||
3 " Menu Principal " 3>&1 1>&2 2>&3)
|
exitstatus=$?
|
||||||
exitstatus=$?
|
#on recupere ce choix
|
||||||
#on recupere ce choix
|
#exitstatus=$?
|
||||||
#exitstatus=$?
|
if [ $exitstatus = 0 ]; then
|
||||||
if [ $exitstatus = 0 ]; then
|
echo "Your chosen option:" $choix
|
||||||
echo "Your chosen option:" $choix
|
else
|
||||||
else
|
echo "You chose cancel."; break;
|
||||||
echo "You chose cancel."; break;
|
fi
|
||||||
fi
|
# case : action en fonction du choix
|
||||||
# case : action en fonction du choix
|
case $choix in
|
||||||
case $choix in
|
1)
|
||||||
1)
|
menu-up-fdm ;;
|
||||||
menu-up-fdm ;;
|
2)
|
||||||
2)
|
menu-up-fdmon ;;
|
||||||
menu-up-fdmon ;;
|
3)
|
||||||
3)
|
break;
|
||||||
break;
|
esac
|
||||||
esac
|
done
|
||||||
done
|
exit 0
|
||||||
exit 0
|
|
||||||
|
|
||||||
|
EOF
|
||||||
EOF
|
#
|
||||||
#
|
|
||||||
|
sudo cat > /bin/menu-up-fdm <<- "EOF"
|
||||||
sudo cat > /bin/menu-up-fdm <<- "EOF"
|
#!/bin/bash
|
||||||
#!/bin/bash
|
while : ; do
|
||||||
while : ; do
|
choix=$(whiptail --title "Raspbian Proyect HP3ICC / update FreeDMR" --menu "Nota Importante: debe debe agregar todos sus obp en la opcion numero uno, ( 1-Lista de OBP )antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo la carpeta /opt/FreeDMR, al finalizar la actualizacion el servicio Freedmr se reinniciara automaticamente.
|
||||||
choix=$(whiptail --title "Raspbian Proyect HP3ICC / update FreeDMR" --menu "Nota Importante: debe debe agregar todos sus obp en la opcion numero uno, ( 1-Lista de OBP )antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo la carpeta /opt/FreeDMR, al finalizar la actualizacion el servicio Freedmr se reinniciara automaticamente.
|
" 18 55 5 \
|
||||||
" 18 55 5 \
|
1 " List OBP " \
|
||||||
1 " List OBP " \
|
2 " List Rules " \
|
||||||
2 " List Rules " \
|
3 " shell extra " \
|
||||||
3 " shell extra " \
|
4 " Iniciar Actualizacion FreeDMR " \
|
||||||
4 " Iniciar Actualizacion FreeDMR " \
|
5 " Menu Principal " 3>&1 1>&2 2>&3)
|
||||||
5 " Menu Principal " 3>&1 1>&2 2>&3)
|
exitstatus=$?
|
||||||
exitstatus=$?
|
#on recupere ce choix
|
||||||
#on recupere ce choix
|
#exitstatus=$?
|
||||||
#exitstatus=$?
|
if [ $exitstatus = 0 ]; then
|
||||||
if [ $exitstatus = 0 ]; then
|
echo "Your chosen option:" $choix
|
||||||
echo "Your chosen option:" $choix
|
else
|
||||||
else
|
echo "You chose cancel."; break;
|
||||||
echo "You chose cancel."; break;
|
fi
|
||||||
fi
|
# case : action en fonction du choix
|
||||||
# case : action en fonction du choix
|
case $choix in
|
||||||
case $choix in
|
1)
|
||||||
1)
|
sudo nano /opt/obp.txt ;;
|
||||||
sudo nano /opt/obp.txt ;;
|
2)
|
||||||
2)
|
sudo nano /opt/rules.txt ;;
|
||||||
sudo nano /opt/rules.txt ;;
|
3)
|
||||||
3)
|
sudo nano /opt/extra-1.sh && chmod +x /opt/extra* ;;
|
||||||
sudo nano /opt/extra-1.sh && chmod +x /opt/extra* ;;
|
4)
|
||||||
4)
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-SERVER-Install/main/fdmr-update.sh)" ;;
|
||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-SERVER-Install/main/fdmr-update.sh)" ;;
|
5)
|
||||||
5)
|
break;
|
||||||
break;
|
esac
|
||||||
esac
|
done
|
||||||
done
|
exit 0
|
||||||
exit 0
|
EOF
|
||||||
EOF
|
#
|
||||||
#
|
#
|
||||||
#
|
sudo cat > /bin/menu-up-fdmon <<- "EOF"
|
||||||
sudo cat > /bin/menu-up-fdmon <<- "EOF"
|
#!/bin/bash
|
||||||
#!/bin/bash
|
while : ; do
|
||||||
while : ; do
|
choix=$(whiptail --title "Raspbian Proyect HP3ICC / update FDMR-Monitor OA4DOA" --menu "Nota Importante: antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo todas las configuraciones, al finalizar la actualizacion el servicio se reinniciara automaticamente.
|
||||||
choix=$(whiptail --title "Raspbian Proyect HP3ICC / update FDMR-Monitor OA4DOA" --menu "Nota Importante: antes de iniciar la actualizacion, el proceso de actualizacion borrara por completo todas las configuraciones, al finalizar la actualizacion el servicio se reinniciara automaticamente.
|
" 17 50 4 \
|
||||||
" 17 50 4 \
|
1 " shell extra " \
|
||||||
1 " shell extra " \
|
2 " Iniciar Actualizacion HBMon2 " \
|
||||||
2 " Iniciar Actualizacion HBMon2 " \
|
3 " Menu Principal " 3>&1 1>&2 2>&3)
|
||||||
3 " Menu Principal " 3>&1 1>&2 2>&3)
|
exitstatus=$?
|
||||||
exitstatus=$?
|
#on recupere ce choix
|
||||||
#on recupere ce choix
|
#exitstatus=$?
|
||||||
#exitstatus=$?
|
if [ $exitstatus = 0 ]; then
|
||||||
if [ $exitstatus = 0 ]; then
|
echo "Your chosen option:" $choix
|
||||||
echo "Your chosen option:" $choix
|
else
|
||||||
else
|
echo "You chose cancel."; break;
|
||||||
echo "You chose cancel."; break;
|
fi
|
||||||
fi
|
# case : action en fonction du choix
|
||||||
# case : action en fonction du choix
|
case $choix in
|
||||||
case $choix in
|
1)
|
||||||
1)
|
sudo nano /opt/extra-2.sh && chmod +x /opt/extra* ;;
|
||||||
sudo nano /opt/extra-2.sh && chmod +x /opt/extra* ;;
|
2)
|
||||||
2)
|
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-SERVER-Install/main/selfservice-update.sh)" ;;
|
||||||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/hp3icc/Easy-FreeDMR-SERVER-Install/main/selfservice-update.sh)" ;;
|
3)
|
||||||
3)
|
break;
|
||||||
break;
|
esac
|
||||||
esac
|
done
|
||||||
done
|
exit 0
|
||||||
exit 0
|
|
||||||
|
|
||||||
|
EOF
|
||||||
EOF
|
#
|
||||||
#
|
|
||||||
|
#
|
||||||
#
|
sudo chmod +x /bin/menu*
|
||||||
sudo chmod +x /bin/menu*
|
menu-update
|
||||||
menu-update
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue