mirror of https://github.com/MISP/misp-dashboard
chg: create zmqs user + sudoer right for www-data
parent
e2dea48294
commit
1439804d46
|
@ -3,6 +3,15 @@
|
|||
set -e
|
||||
#set -x
|
||||
|
||||
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
|
||||
fi
|
||||
|
||||
sudo apt-get install python3-virtualenv virtualenv screen redis-server unzip -y
|
||||
|
||||
if [ -z "$VIRTUAL_ENV" ]; then
|
||||
|
|
|
@ -48,3 +48,6 @@ if [ "${check_dashboard_port}" == "1" ]; then
|
|||
else
|
||||
echo -e $RED"\t* NOT starting flask server, made a very unrealiable check on port 8001, and something seems to be there… please double check if this is good!"$DEFAULT
|
||||
fi
|
||||
|
||||
sleep 0.1
|
||||
sudo -u zmqs /bin/bash /var/www/misp-dashboard/start_zmq.sh &
|
||||
|
|
Loading…
Reference in New Issue