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

added basic script to run the mosquitto server

parent 296bcc4b
#!/bin/bash
### 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"
popd
\ 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
#!/bin/sh
mosquitto_passwd -U users.pwd
# telemersive-bus mosquitto config
port 3883
pid_file telemersive-bus.pid
# 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
[Unit]
Description=Mosquitto Service for telemersive-server.
# run after network is up
Requires=network-online.target
After=network-online.target
[Service]
Type=simple
ExecStart=/usr/sbin/mosquitto -c /opt/telemersive-bus/mosquitto.conf
User=telemersive-bus
[Install]
WantedBy=multi-user.target
manager:$6$XwFbODKDYaswAUqH$/fdEaVzzB/tH+thS77W+10tfUg3iv+KukSYhuaCjBsWVQxjon5QHRyIMiuq5OQJFDVojkC9fe/ltzaexoS/I9Q==
peer:$6$ZN+9eGZyBXO6QiHP$UofPw54vHd4j5tP6Do3u48VP71qidI85MUli/BXtcdeaxTeis63NiJow4evTRCW/vNQKYH3RTQniJIwj/Of+GA==
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