Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if [ ! -f ".env" ]; then
- touch .env
- echo -n "Enter the DBNAME and press [ENTER]: "
- read databasename
- echo -n "Enter the DBPREFIX and press [ENTER]: "
- read databaseprefix
- echo -n "Enter the WPURL and press [ENTER]: "
- read wordpressurl
- echo -n "Enter the WPTITLE and press [ENTER]: "
- read wordpresstitle
- echo -n "Enter the WPADMINEMAIL and press [ENTER]: " # Will entually remove this when we have a name.
- read wordpressadminemail
- echo -n "Enter the BBUSER and press [ENTER]: "
- read bitbucketuser
- wpconfig=( "DBHOST=localhost" "DBNAME=$databasename" "DBUSER=root" "DBPASS=root" "DBPREFIX=$databaseprefix" "WPURL=$wordpressurl" "WPSITETITLE=$wordpresstitle" "WPADMINUSER=jake" "WPADMINPASS=password" "WPADMINEMAIL=$wordpressadminemail" "BBUSER=$bitbucketuser" )
- for i in "${wpconfig[@]}"
- do
- printf "%sn" "$i"
- done > .env
- else
- while read -r line
- do
- declare global "$line"
- done < .env
- detailsList=( 'DBHOST' 'DBNAME' 'DBUSER' 'DBPASS' 'DBPREFIX' 'WPURL' 'WPSITETITLE' 'WPADMINUSER' 'WPADMINPASS' 'WPADMINEMAIL' 'BBUSER' )
- for i in "${detailsList[@]}"
- do
- if [ -z "${!i}" ]; then
- echo "'$i' is not set"
- exit
- fi
- done
- echo $DBNAME;
- fi
- if [ "$ACTION" = "init" ]; then
- checkDirectory
- clearDetails
- checkDetails
- downloadWP
- configWP
- installWP
- emptySite
- sudo chown user:_www *
- sudo chmod -R 775 *
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement