Commit 1fbc1d10 authored by Carlos Juliano Viana's avatar Carlos Juliano Viana Committed by Carlos Juliano Viana
Browse files

Adicionando validação para criação dos diretórios de runtime do sgad.

[SOMA-3771]
[SOMA-2554]

(cherry picked from commit 0297af77)
parent 35f13b72
#!/bin/sh
timestamp=$(date +%Y%m%d%H%M%S)
logsdir="logs"
[ ! -e $logsdir ] && echo "mkdir $logsdir" && mkdir $logsdir
logfile="logs/sgad_${timestamp}.log"
confgfile=${1}
if [ -z ${confgfile} ]; then
configfile=${1}
if [ -z ${configfile} ]; then
echo "Using default file configuration" > ${logfile};
confgfile=sgad.cfg
configfile=sgad.cfg
fi
hostruntimedir="/tmp/chuva"
sgadruntimedir="${hostruntimedir}/sgad"
runtimesandboxdir="${sgadruntimedir}/sandbox"
[ ! -e $hostruntimedir ] && echo "mkdir $hostruntimedir..." && mkdir $hostruntimedir
[ ! -e $sgadruntimedir ] && echo "mkdir $sgadruntimedir..." && mkdir $sgadruntimedir
[ ! -e $runtimesandboxdir ] && echo "mkdir $runtimesandboxdir..." && mkdir $runtimesandboxdir
eval $(luarocks path --bin)
sgad ${confgfile} 2>&1 | tee -a "${logfile}"
sgad ${configfile} 2>&1 | tee -a "${logfile}"
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