Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
csbase-dev
sgarest-daemon
Commits
1fbc1d10
Commit
1fbc1d10
authored
Feb 17, 2020
by
Carlos Juliano Viana
Committed by
Carlos Juliano Viana
Mar 25, 2020
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
sgad.sh
View file @
1fbc1d10
#!/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
echo
"Using default file configuration"
>
${
logfile
}
;
confgfile
=
sgad.cfg
conf
i
gfile
=
${
1
}
if
[
-z
${
conf
i
gfile
}
]
;
then
echo
"Using default file configuration"
>
${
logfile
}
;
conf
i
gfile
=
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
}
"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment