diff --git a/docker-configs/docker-compose.yml b/docker-configs/docker-compose.yml index 9f07818..1771c73 100644 --- a/docker-configs/docker-compose.yml +++ b/docker-configs/docker-compose.yml @@ -24,7 +24,7 @@ services: cpu_shares: 1024 mem_reservation: 600m volumes: - - '/etc/ADN-Systems/ADN.cfg:/opt/ADN-DMR-Peer-Server/config/ADN.cfg' + - '/etc/ADN-Systems/adn.cfg:/opt/ADN-DMR-Peer-Server/config/adn.cfg' ports: - '62031:62031/udp' diff --git a/docker-configs/docker-compose_install.sh b/docker-configs/docker-compose_install.sh index 08efc72..8adb2cb 100644 --- a/docker-configs/docker-compose_install.sh +++ b/docker-configs/docker-compose_install.sh @@ -1,7 +1,6 @@ #!/bin/bash # -############################################################################### -# Copyright (C) 2020 Simon Adlem, G7RZU +############################################################################### # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,9 +15,10 @@ # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +# ############################################################################### -echo FreeDMR Docker installer... +echo ADN-DMR-Peer-Server Docker installer... echo Installing required packages... echo Install Docker Community Edition... @@ -59,61 +59,33 @@ echo Restart docker... systemctl restart docker && echo Make config directory... -mkdir /etc/freedmr && -mkdir -p /etc/freedmr/acme.sh && -mkdir -p /etc/freedmr/certs && -chmod -R 755 /etc/freedmr && +mkdir /etc/ADN-Systems && +mkdir -p /etc/ADN-Systems/acme.sh && +mkdir -p /etc/ADN-Systems/certs && +chmod -R 755 /etc/ADN-Systems && echo make json directory... -mkdir -p /etc/freedmr/json && -chown 54000:54000 /etc/freedmr/json && +mkdir -p /etc/ADN-Systems/data && +chown 54000:54000 /etc/ADN-Systems/data && -echo Install /etc/freedmr/freedmr.cfg ... -cat << EOF > /etc/freedmr/freedmr.cfg +echo Install /etc/ADN-Systems/adn.cfg ... +cat << EOF > /etc/ADN-Systems/adn.cfg #This empty config file will use defaults for everything apart from OBP and HBP config #This is usually a sensible choice. -#I have moved to a config like this to encourage servers to use the accepted defaults -#unless you really know what you are doing. [GLOBAL] -#If you join the FreeDMR network, you need to add your ServerID Here. -SERVER_ID: 0 +SERVER_ID: 0000 +DEBUG_BRIDGES: True [REPORTS] -[LOGGER] +[LOGGER] [ALIASES] [ALLSTAR] -#This is an example OpenBridgeProtocol (OBP) or FreeBridgeProtocol (FBP) configuration -#If you joing FreeDMR, you will be given a config like this to paste in -[OBP-TEST] -MODE: OPENBRIDGE -ENABLED: False -IP: -PORT: 62044 -#The ID which you expect to see sent from the other end of the link. -NETWORK_ID: 1 -PASSPHRASE: mypass -TARGET_IP: -TARGET_PORT: 62044 -USE_ACL: True -SUB_ACL: DENY:1 -TGID_ACL: PERMIT:ALL -#Should always be true if using docker. -RELAX_CHECKS: True -#True for FBP, False for OBP -ENHANCED_OBP: True -#PROTO_VER should be 5 for FreeDMR servers using FBP -#1 for other servers using OBP -PROTO_VER: 5 - -#This defines parameters for repeater/hotspot connections -#via HomeBrewProtocol (HBP) -#I don't recommend changing most of this unless you know what you are doing [SYSTEM] MODE: MASTER ENABLED: True @@ -121,7 +93,7 @@ REPEAT: True MAX_PEERS: 1 EXPORT_AMBE: False IP: 127.0.0.1 -PORT: 54000 +PORT: 56400 PASSPHRASE: GROUP_HANGTIME: 5 USE_ACL: True @@ -129,7 +101,7 @@ REG_ACL: DENY:1 SUB_ACL: DENY:1 TGID_TS1_ACL: PERMIT:ALL TGID_TS2_ACL: PERMIT:ALL -DEFAULT_UA_TIMER: 10 +DEFAULT_UA_TIMER: 60 SINGLE_MODE: False VOICE_IDENT: False TS1_STATIC: @@ -162,11 +134,11 @@ SLOTS: 1 LATITUDE: 00.0000 LONGITUDE: 000.0000 HEIGHT: 0 -LOCATION: Earth +LOCATION: 9990 Parrot DESCRIPTION: ECHO -URL: www.freedmr.uk +URL: adn.systems SOFTWARE_ID: 20170620 -PACKAGE_ID: MMDVM_FreeDMR +PACKAGE_ID: MMDVM_ADN-Systems GROUP_HANGTIME: 5 OPTIONS: USE_ACL: True @@ -174,15 +146,112 @@ SUB_ACL: DENY:1 TGID_TS1_ACL: PERMIT:ALL TGID_TS2_ACL: PERMIT:ALL ANNOUNCEMENT_LANGUAGE: en_GB + +EOF +# +echo Install /etc/ADN-Systems/fdmr-mon.cfg ... +cat << EOF > /etc/ADN-Systems/fdmr-mon.cfg +[GLOBAL] +# Display Bridge status +BRIDGES_INC = False +# Display Peers status +HOMEBREW_INC = True +# Lastheard table on main page +LASTHEARD_ROWS = 20 +# Display empty masters +EMPTY_MASTERS = False +# TG Count on TOP TG's page +TGCOUNT_ROWS = 20 + +[FDMR CONNECTION] +# FDMR server's IP Address or hostname +FDMR_IP = 172.16.238.10 +# FDMR server's TCP reporting socket +FDMR_PORT = 4321 + +[OPB FILTER] +# if you don't want to show in lastherad received traffic from OBP link put NETWORK ID +# for example: 260210, 260211, 260212 +OPB_FILTER = + +[FILES] +# Files and stuff for loading alias files for mapping numbers to names +FILES_PATH = ./data +# This files will auto-download +PEER_FILE = peer_ids.json +SUBSCRIBER_FILE = subscriber_ids.json +TGID_FILE = talkgroup_ids.json +# User provided files, if you don't use it, you can comment it. +LOCAL_SUB_FILE = local_subscriber_ids.json +LOCAL_PEER_FILE = local_peer_ids.json +LOCAL_TGID_FILE = local_talkgroup_ids.json +# Number of days before we reload DMR-MARC database files. +RELOAD_TIME = 1 +PEER_URL = https://adn.systems/files/peer_ids.json +SUBSCRIBER_URL = https://adn.systems/files/subscriber_ids.json +TGID_URL = https://adn.systems/files/talkgroup_ids.json + + + +[LOGGER] +# Settings for log files +LOG_PATH = /dev/ +LOG_FILE = null +LOG_LEVEL = WARN + +[WEBSOCKET SERVER] +WEBSOCKET_PORT = 9000 +# Frequency to push updates to web clients +FREQUENCY = 1 +# Clients are timed out after this many seconds, 0 to disable +CLIENT_TIMEOUT = 0 +# SSL configuration +USE_SSL = False +SSL_PATH = ./ssl +SSL_CERTIFICATE = cert.pem +SSL_PRIVATEKEY = key.pem + +[DASHBOARD] + # Dashboard Title +DASHTITLE = "DMR Server" + # Background image True or False if True put a bk.jpg 1920x1080 in img folder +BACKGROUND = False + # this defines the default language + # available languages: en, es, fr, pt, it, nl, de +LANGUAGE = "en" + # Navbar Title +NAVTITLE= "DMR Server" + # --Navbar Links-- # +#NAV_LNK_NAME = "Links" +#LINK1 = "Name 1", "http://url.link" +#LINK2 = "Name 2", "https://site.link" +#LINK3 = "Name 3", "https://goaway.link" + #LINKx put as many as you want + # World Wide Server List +#SERVER_LIST = "http://url/Hosts.txt" + # World Wide Bridge List +#BRIDGES_LIST = "https://url/Bridges.csv" + # World Wide TalkGroups List +#TG_LIST = "https://url/Talkgroups.csv" +#TELEGRAM = "url" +#WHATSAPP = "url" +#FACEBOOK = "url" +#SERVER_LIST = "http://yourwebsite/Hosts.txt" + # --Footer Links-- # + # Beginning of footer +#FOOTER1 = "SYSOP N0CALL" + # End of footer +#FOOTER2 = "Your Project Project" + EOF echo Set perms on config directory... -chown -R 54000 /etc/freedmr && +chown -R 54000 /etc/ADN-Systems && echo Get docker-compose.yml... -cd /etc/freedmr && -curl https://gitlab.hacknix.net/hacknix/FreeDMR/-/raw/master/docker-configs/docker-compose.yml -o docker-compose.yml && +cd /etc/ADN-Systems && +curl https://raw.githubusercontent.com/Amateur-Digital-Network/ADN-DMR-Peer-Server/develop/docker-configs/docker-compose.yml -o docker-compose.yml && chmod 755 /etc/cron.daily/lastheard @@ -199,8 +268,8 @@ EOF /usr/sbin/sysctl -p && -echo Run FreeDMR container... +echo Run ADN-Systems container... docker-compose up -d -echo Read notes in /etc/freedmr/docker-compose.yml to understand how to implement extra functionality. -echo FreeDMR setup complete! +echo Read notes in /etc/ADN-Systems/docker-compose.yml to understand how to implement extra functionality. +echo ADN-Systems setup complete!