Skip to content
Snippets Groups Projects
Commit b6ed8fda authored by Edileuton Henrique de Oliveira's avatar Edileuton Henrique de Oliveira
Browse files

agent: Fix root cron edit on update

parent 3eae6c84
No related branches found
No related tags found
No related merge requests found
......@@ -68,7 +68,7 @@ function checkUpdate()
# If $FIST_EXECUTION is set, do not run the update. Otherwise, run the
# update and return 1 in case of error
test "${FIRST_EXECUTION}" || sudo bash ${DATADIR}/datasid-update.run || return 1
test "${FIRST_EXECUTION}" || bash ${DATADIR}/datasid-update.run || return 1
rm -f ${DATADIR}/datasid-update.run
......
......@@ -43,21 +43,6 @@ if [[ ${PKG_MD5} != $(md5sum ${PKG_FILE} | awk '{print $1}') ]]; then
exit 4
fi
# Create datasid user, group and home
if ! /usr/sbin/groupadd -r -f datasid; then
printf "ERRO: Falha ao criar o grupo datasid.\n"
exit 1
fi
/usr/sbin/useradd -r -M -g datasid -s /bin/bash -d "${DATASID_HOME}" datasid
RETVAL=$?
# NOTE: RETVAL=9 means the user already exists (that is acceptable)
if test ${RETVAL} -ne 0 -a ${RETVAL} -ne 9; then
printf "ERRO: Falha ao criar o usuário datasid.\n"
exit 2
fi
# Make sure home exists
mkdir -p "${DATASID_HOME}"
......@@ -91,11 +76,6 @@ fi
rm -f "${PKG_FILE}"
# Change files owner
if ! chown -R datasid:datasid "${DATASID_HOME}"; then
printf "WARNING: Falha ao mudar dono dos arquivos.\n"
fi
# Check if the new files are OK
if ! md5sum --quiet --check .md5sum; then
printf "WARNING: Arquivos extraidos corrompidos, restaurando backup...\n"
......
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