Commit 6eab6807 authored by Florian Bruggisser's avatar Florian Bruggisser
Browse files

added basic script to run the mosquitto server

parent 296bcc4b
### This scripts starts the broker and can be used for testsing or deployment.
### The broker iteself is configured by relative pahts, so it's important that
### it runs inside the ./broker directory.
### Florian Bruggisser 16.02.2021
# Read the asolute path to the script file.
SCRIPT_PATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
echo "Working Directory: $SCRIPT_PATH"
# switch to working directory
pushd "$SCRIPT_PATH/broker/"
# run mosquitto
mosquitto -c "mosquitto.conf"
\ No newline at end of file
# access control list
user manager
topic readwrite tBus/#
user peer
topic write tBus/roomCreate
topic read tBus/roomClose
topic write tBus/peerLeaving
topic read tBus/rooms/+/peers/+/joined
topic read tBus/rooms/+/peers/+/left
topic read tBus/rooms/+/alive
topic write tBus/rooms/+/alive/ping
topic read tBus/rooms/+/info
topic read tBus/peers/+/roomAccess
topic readwrite tBus/rooms/+/speed
topic readwrite tBus/peers/+/speed/ping
topic read tBus/rooms/+/chat
topic write tBus/rooms/+/chat/msg
topic readwrite tBus/rooms/+/mqtt/#
topic readwrite tBus/rooms/+/osc
mosquitto_passwd -U users.pwd
# telemersive-bus mosquitto config
port 3883
# logging
log_type notice
log_dest file mosquitto.log
# persistence
persistence true
autosave_interval 1800
persistence_file mosquitto.db
persistence_location .
# authentication
allow_anonymous false
password_file users.pwd
acl_file acl.conf
\ No newline at end of file
Description=Mosquitto Service for telemersive-server.
# run after network is up
ExecStart=/usr/sbin/mosquitto -c /opt/telemersive-bus/mosquitto.conf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment