#!/usr/bin/env bash cat<e; 0; end' 2>> /dev/null` if [[ "$scnr_pro_user" == "1" ]]; then update=true else update=false fi else update=false if [[ ! -f "$db_config" ]]; then mv $scnr_dir/.system/scnr-ui-pro/config/database.yml $HOME/.scnr/pro/config/ mv $scnr_dir/.system/scnr-ui-pro/config/database.postgres.yml $HOME/.scnr/pro/config/ else update=true fi rm -f $scnr_dir/.system/scnr-ui-pro/config/database.yml ln -s $HOME/.scnr/pro/config/database.yml $scnr_dir/.system/scnr-ui-pro/config/database.yml fi scnr_edition=`$scnr_dir/bin/scnr_edition` if [[ $scnr_edition == "dev" || $scnr_edition == "trial" || $scnr_edition == "pro" || $scnr_edition == "enterprise" ]]; then if [ "$update" = true ]; then echo -n " * Updating the DB..." $scnr_dir/bin/scnr_pro_task db:migrate 2>> $log 1>> $log handle_failure else echo -n " * Setting up the DB..." $scnr_dir/bin/scnr_pro_task db:create db:migrate db:seed 2>> $log 1>> $log handle_failure fi echo "done." fi echo echo echo -n "Spectre Scan installed at: " echo $scnr_dir echo "Installation log at: $log" echo echo "* For a CLI scan you can run: $scnr_dir/bin/scnr URL" if [[ $scnr_edition == "trial" || $scnr_edition == "pro" || $scnr_edition == "enterprise" ]]; then echo "* To use Spectre Scan Pro you can run: $scnr_dir/bin/scnr_pro" if [[ "$1" != "docker" ]]; then echo " * For a better experience please setup PostreSQL: https://github.com/ecsypno/spectre-scan/installer#postgresql" fi fi echo echo "Documentation can be found at: https://documentation.ecsypno.com/scnr/" echo