DMRlink/mk-dmrlink

141 lines
4.8 KiB
Plaintext
Raw Normal View History

2017-01-30 15:20:51 -05:00
#! /bin/bash
#################################################
# #
# Install DMRlink in seperate directories by #
# Application #
#################################################
2017-01-30 15:24:36 -05:00
# Install the required support programs
2017-01-30 15:20:51 -05:00
apt-get install unzip -y
apt-get install python-dev -y
apt-get install python-pip -y
apt-get install python-twisted -y
pip install bitstring
pip install bitarray
cd /opt
git clone https://github.com/n0mjs710/dmr_utils.git
cd dmr_utils/
pip install .
2017-01-30 15:24:36 -05:00
echo "Required programs installed, continuing"
2017-01-30 15:20:51 -05:00
# To allow multiple instances of DMRlink to run
# You need multiple ipsc directories, dmrlink.py and dmrlink.cfg
# The needed files are copied to /opt/dmrlink
# Make needed directories
mkdir -p /opt/dmrlink/ambe_audio/
mkdir -p /opt/dmrlink/bridge/
mkdir -p /opt/dmrlink/confbridge/
mkdir -p /opt/dmrlink/log/
mkdir -p /opt/dmrlink/playback/
mkdir -p /opt/dmrlink/play_group/
mkdir -p /opt/dmrlink/proxy/
2017-01-30 15:20:51 -05:00
mkdir -p /opt/dmrlink/rcm/
mkdir -p /opt/dmrlink/record/
2017-01-30 15:20:51 -05:00
mkdir -p /opt/dmrlink/samples
mkdir -p /var/log/dmrlink
cd /opt/dmrlink
# Put common files in /opt/dmrlink
# cp /srv/DMRlink/peer_ids.csv /opt/dmrlink
# cp /srv/DMRlink/subscriber_ids.csv /opt/dmrlink
# cp /srv/DMRlink/talkgroup_ids.csv /opt/dmrlink
2017-01-30 15:20:51 -05:00
# Copy ipsc directory into each app directory
cp -rf /srv/DMRlink/ipsc/ /opt/dmrlink/ambe_audio/
cp -rf /srv/DMRlink/ipsc/ /opt/dmrlink/bridge/
cp -rf /srv/DMRlink/ipsc/ /opt/dmrlink/confbridge/
cp -rf /srv/DMRlink/ipsc/ /opt/dmrlink/log/
cp -rf /srv/DMRlink/ipsc/ /opt/dmrlink/playback/
cp -rf /srv/DMRlink/ipsc/ /opt/dmrlink/play_group/
cp -rf /srv/DMRlink/ipsc/ /opt/dmrlink/proxy/
2017-01-30 15:20:51 -05:00
cp -rf /srv/DMRlink/ipsc/ /opt/dmrlink/rcm/
cp -rf /srv/DMRlink/ipsc/ /opt/dmrlink/record/
2017-01-30 15:20:51 -05:00
# Put a copy of the samples together for easy reference
cp /srv/DMRlink/bridge_rules_SAMPLE.py /opt/dmrlink/samples
cp /srv/DMRlink/confbridge_rules_SAMPLE.py /opt/dmrlink/samples
cp /srv/DMRlink/dmrlink_SAMPLE.cfg /opt/dmrlink/samples
cp /srv/DMRlink/known_bridges_SAMPLE.py /opt/dmrlink/samples
cp /srv/DMRlink/playback_config_SAMPLE.py /opt/dmrlink/samples
cp /srv/DMRlink/ambe_audio.cfg /opt/dmrlink/samples
cp /srv/DMRlink/sub_acl_SAMPLE.py /opt/dmrlink/samples
# Put the doc together for easy reference
2017-01-31 14:48:16 -05:00
cp -rf /srv/DMRlink/documents /opt/dmrlink
2017-01-30 15:20:51 -05:00
cp /srv/DMRlink/LICENSE.txt /opt/dmrlink/documents
cp /srv/DMRlink/requirements.txt /opt/dmrlink/documents
cp /srv/DMRlink/ambe_audio_commands.txt /opt/dmrlink/documents
# ambe_audio
cp /srv/DMRlink/dmrlink.py /opt/dmrlink/ambe_audio/
cp /srv/DMRlink/dmrlink_SAMPLE.cfg /opt/dmrlink/ambe_audio/
#
cp /srv/DMRlink/ambe_audio.cfg /opt/dmrlink/ambe_audio/
cp /srv/DMRlink/ambe_audio.py /opt/dmrlink/ambe_audio/
cp /srv/DMRlink/ambe_audio_commands.txt /opt/dmrlink/ambe_audio/
cp /srv/DMRlink/template.bin /opt/dmrlink/ambe_audio/
# Bridge app
cp /srv/DMRlink/dmrlink.py /opt/dmrlink/bridge/
cp /srv/DMRlink/dmrlink_SAMPLE.cfg /opt/dmrlink/bridge/
#
cp /srv/DMRlink/bridge.py /opt/dmrlink/bridge/
cp /srv/DMRlink/bridge_rules_SAMPLE.py /opt/dmrlink/bridge/
cp /srv/DMRlink/known_bridges_SAMPLE.py /opt/dmrlink/bridge/
cp /srv/DMRlink/sub_acl_SAMPLE.py /opt/dmrlink/bridge/
# ConfBridge app
cp /srv/DMRlink/dmrlink.py /opt/dmrlink/confbridge/
cp /srv/DMRlink/dmrlink_SAMPLE.cfg /opt/dmrlink/confbridge/
#
cp /srv/DMRlink/confbridge.py /opt/dmrlink/confbridge/
cp /srv/DMRlink/confbridge_rules_SAMPLE.py /opt/dmrlink/confbridge/
cp /srv/DMRlink/known_bridges_SAMPLE.py /opt/dmrlink/confbridge/
cp /srv/DMRlink/sub_acl_SAMPLE.py /opt/dmrlink/confbridge/
# Log app
cp /srv/DMRlink/dmrlink.py /opt/dmrlink/log/
cp /srv/DMRlink/dmrlink_SAMPLE.cfg /opt/dmrlink/log/
#
cp /srv/DMRlink/log.py /opt/dmrlink/log/
# Playback (Parrot)
cp /srv/DMRlink/dmrlink.py /opt/dmrlink/playback/
cp /srv/DMRlink/dmrlink_SAMPLE.cfg /opt/dmrlink/playback/
#
cp /srv/DMRlink/playback.py /opt/dmrlink/playback/
cp /srv/DMRlink/playback_config_SAMPLE.py /opt/dmrlink/playback/
# Play Group app
cp /srv/DMRlink/dmrlink.py /opt/dmrlink/play_group/
cp /srv/DMRlink/dmrlink_SAMPLE.cfg /opt/dmrlink/play_group/
#
cp /srv/DMRlink/play_group.py /opt/dmrlink/play_group/
# proxy app
cp /srv/DMRlink/dmrlink.py /opt/dmrlink/proxy/
cp /srv/DMRlink/dmrlink_SAMPLE.cfg /opt/dmrlink/rcm/
2017-01-30 15:20:51 -05:00
#
cp /srv/DMRlink/proxy.py /opt/dmrlink/proxy/
cp /srv/DMRlink/known_bridges_SAMPLE.py /opt/dmrlink/proxy/
cp /srv/DMRlink/sub_acl_SAMPLE.py /opt/dmrlink/proxy/
2017-01-30 15:20:51 -05:00
# rcm app
cp /srv/DMRlink/dmrlink.py /opt/dmrlink/rcm/
cp /srv/DMRlink/dmrlink_SAMPLE.cfg /opt/dmrlink/rcm/
#
cp /srv/DMRlink/rcm_db_log.py /opt/dmrlink/rcm/
cp /srv/DMRlink/rcm.py /opt/dmrlink/rcm/
# record app
cp /srv/DMRlink/dmrlink.py /opt/dmrlink/record/
cp /srv/DMRlink/dmrlink_SAMPLE.cfg /opt/dmrlink/record/
#
cp /srv/DMRlink/record.py /opt/dmrlink/record/
2017-01-05 15:01:32 -05:00