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.


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