Skip to content
Snippets Groups Projects
Commit c6af6aa5 authored by David Trattnig's avatar David Trattnig
Browse files

Extend install script.

parent 34bfb122
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,16 @@ fi ...@@ -18,7 +18,16 @@ fi
# Production # Production
if [ $mode == "api" ]; then if [ $mode == "dev" ]; then
echo "Copy configuration to './configuration/engine.ini'"
cp -n sample.engine.ini engine.ini
fi
# Production
if [ $mode == "prod" ]; then
if getent passwd 'engineuser' > /dev/null 2>&1; then if getent passwd 'engineuser' > /dev/null 2>&1; then
echo "User 'engineuser' exists already."; echo "User 'engineuser' exists already.";
else else
...@@ -27,9 +36,6 @@ if [ $mode == "api" ]; then ...@@ -27,9 +36,6 @@ if [ $mode == "api" ]; then
adduser engineuser sudo adduser engineuser sudo
fi fi
echo "Set Ownership of '/opt/aura/engine' to Engine User"
chown -R engineuser:engineuser .
echo "Copy Supervisor Config to '/etc/supervisor/conf.d'" echo "Copy Supervisor Config to '/etc/supervisor/conf.d'"
cp configuration/supervisor/engine-api.conf /etc/supervisor/conf.d/ cp configuration/supervisor/engine-api.conf /etc/supervisor/conf.d/
...@@ -39,7 +45,14 @@ if [ $mode == "api" ]; then ...@@ -39,7 +45,14 @@ if [ $mode == "api" ]; then
echo "Create Configuration Directory `/etc/aura/engine`" echo "Create Configuration Directory `/etc/aura/engine`"
mkdir -p /etc/aura mkdir -p /etc/aura
mkdir -p /etc/aura/engine
echo "Copy configuration to './configuration/engine.ini'"
cp -n sample.engine.ini engine.ini
echo "Set Ownership of '/opt/aura/engine', '/var/log/aura/' and '/etc/aura/engine.ini' to Engine User"
chown -R engineuser:engineuser .
chown -R engineuser:engineuser /var/log/aura/
chown -R engineuser:engineuser /etc/aura/engine.ini
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment