Skip to content

Commit

Permalink
Refine service script
Browse files Browse the repository at this point in the history
  • Loading branch information
mreid-tt committed Sep 25, 2024
1 parent 3868eb4 commit a905534
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spk/mantisbt/src/service-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,11 @@ service_postinst ()
rsync -aX -I "${SYNOPKG_PKGDEST}/web/config_inc.php" "${CFG_FILE}" 2>&1

# Setup configuration file
sed -i -e "s/@password@/${wizard_mysql_password_mantisbt:=mantisbt}/g" ${CFG_FILE}
MARIADB_PASSWORD_ESCAPED=$(printf '%s' "${wizard_mysql_password_mantisbt}" | sed 's/[&/\]/\\&/g')
sed -i -e "s/@password@/${MARIADB_PASSWORD_ESCAPED:=mantisbt}/g" ${CFG_FILE}
RAND_STR=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 64)
sed -i -e "s/@rand_str@/${RAND_STR}/g" ${CFG_FILE}
sed -i -e "s/@web_url@/${wizard_install_url}/g" ${CFG_FILE}
sed -i -e "s#@web_url@#${wizard_install_url}#g" ${CFG_FILE}

# Install/upgrade database
echo "Run ${SC_DNAME} installer"
Expand Down

0 comments on commit a905534

Please sign in to comment.