chg: create zmqs user + sudoer right for www-data

pull/105/head
Jean-Louis Huynen 2019-06-21 12:35:53 +02:00
parent e2dea48294
commit 1439804d46
2 changed files with 12 additions and 0 deletions

View File

@ -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

View File

@ -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 &