mirror of https://github.com/MISP/misp-dashboard
Merge branch 'master' of github.com:MISP/misp-dashboard
commit
b2be833801
|
@ -90,7 +90,7 @@ Traceback (most recent call last):
|
|||
with open(dst, 'wb') as fdst:
|
||||
OSError: [Errno 26] Text file busy: '/home/steve/code/misp-dashboard/DASHENV/bin/python3'
|
||||
```
|
||||
- Restart the System: `./zmq_subscriber.py &`, `./zmq_dispatcher.py &` and `./server.py &`
|
||||
- Restart the System: `./start_all.sh` **OR** `./start_zmq.sh` and `./server.py &`
|
||||
|
||||
# Starting the System
|
||||
:warning: You should not run it as root. Normal privileges are fine.
|
||||
|
|
|
@ -6,16 +6,37 @@
|
|||
## Debug mode
|
||||
#set -x
|
||||
|
||||
# Functions
|
||||
|
||||
get_distribution() {
|
||||
lsb_dist=""
|
||||
# Every system that we officially support has /etc/os-release
|
||||
if [ -r /etc/os-release ]; then
|
||||
lsb_dist="$(. /etc/os-release && echo "$ID")"
|
||||
fi
|
||||
# Returning an empty string here should be alright since the
|
||||
# case statements don't act unless you provide an actual value
|
||||
echo "$lsb_dist" | tr '[:upper:]' '[:lower:]'
|
||||
}
|
||||
|
||||
sudo chmod -R g+w .
|
||||
|
||||
if ! id zmqs >/dev/null 2>&1; then
|
||||
# Create zmq user
|
||||
sudo useradd -U -G www-data -m -s /bin/bash zmqs
|
||||
# Adds right to www-data to run ./start-zmq as zmq
|
||||
sudo echo "www-data ALL=(zmqs) NOPASSWD:/bin/bash /var/www/misp-dashboard/start_zmq.sh" > /etc/sudoers.d/www-data
|
||||
|
||||
if [ "$(get_distribution)" == "rhel" ]; then
|
||||
# Create zmq user
|
||||
sudo useradd -U -G apache -m -s /usr/bin/bash zmqs
|
||||
# Adds right to www-data to run ./start-zmq as zmq
|
||||
echo "apache ALL=(zmqs) NOPASSWD:/bin/bash /var/www/misp-dashboard/start_zmq.sh" |sudo tee /etc/sudoers.d/apache
|
||||
else
|
||||
# Create zmq user
|
||||
sudo useradd -U -G www-data -m -s /bin/bash zmqs
|
||||
# Adds right to www-data to run ./start-zmq as zmq
|
||||
echo "www-data ALL=(zmqs) NOPASSWD:/bin/bash /var/www/misp-dashboard/start_zmq.sh" |sudo tee /etc/sudoers.d/www-data
|
||||
fi
|
||||
fi
|
||||
|
||||
sudo apt-get install python3-virtualenv virtualenv screen redis-server unzip -y
|
||||
sudo apt-get install python3-virtualenv virtualenv screen redis-server unzip net-tools -y
|
||||
|
||||
if [ -z "$VIRTUAL_ENV" ]; then
|
||||
virtualenv -p python3 DASHENV ; DASH_VENV=$?
|
||||
|
|
|
@ -69,4 +69,4 @@ else
|
|||
fi
|
||||
|
||||
sleep 0.1
|
||||
sudo -u zmqs /bin/bash /var/www/misp-dashboard/start_zmq.sh &
|
||||
sudo -u zmqs /bin/bash ${DIR}/start_zmq.sh &
|
||||
|
|
Loading…
Reference in New Issue