Use ocs version variable / fix typo

This commit is contained in:
Gilles Dubois 2021-12-02 17:12:08 +01:00
parent 4410cc9983
commit 06b5c207b5

View File

@ -28,7 +28,7 @@ if [ ! -f $OCS_WEBCONSOLE_DIR/ocsreports/var.php ]; then
rm -rf ${DB_CONFIG_INC_FILE} rm -rf ${DB_CONFIG_INC_FILE}
fi; fi;
cp -r /tmp/OCSNG_UNIX_SERVER-2.9/Api/ /usr/local/share/perl5 cp -r /tmp/OCSNG_UNIX_SERVER-${OCS_VERSION}/Api/ /usr/local/share/perl5
if [ ! -z ${OCS_DISABLE_API_MODE+x} ]; then if [ ! -z ${OCS_DISABLE_API_MODE+x} ]; then
echo echo
@ -81,7 +81,7 @@ if [ ! -f ${SRV_CONF_FILE} ] && [ -z ${OCS_DISABLE_COM_MODE+x} ]; then
fi fi
# Configure zz-ocsinventory-restapi file # Configure zz-ocsinventory-restapi file
if [ ! -f ${API_CONF_FILE} && [ -z ${OCS_DISABLE_API_MODE+x} ]; then if [ ! -f ${API_CONF_FILE} ] && [ -z ${OCS_DISABLE_API_MODE+x} ]; then
cp /tmp/conf/ocsinventory-restapi.conf ${API_CONF_FILE} cp /tmp/conf/ocsinventory-restapi.conf ${API_CONF_FILE}
sed -i 's/DATABASE_SERVER/'"$OCS_DB_SERVER"'/g' ${API_CONF_FILE} sed -i 's/DATABASE_SERVER/'"$OCS_DB_SERVER"'/g' ${API_CONF_FILE}
sed -i 's/DATABASE_PORT/'"$OCS_DB_PORT"'/g' ${API_CONF_FILE} sed -i 's/DATABASE_PORT/'"$OCS_DB_PORT"'/g' ${API_CONF_FILE}