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