main #1

Merged
wade merged 22 commits from Sophia/thelinuxlist:main into main 2022-12-05 11:39:30 -08:00
1 changed files with 38 additions and 0 deletions
Showing only changes of commit 8f82bb22bd - Show all commits

38
scripts/wpinstall.sh Normal file
View File

@ -0,0 +1,38 @@
#!/bin/bash
while true
do
read -r -p "Would you like to install Wordpress? [Y/n] " input
case $input in
[yY][eE][sS]|[yY])
break
;;
[nN][oO]|[nN])
break
;;
*)
echo "That wasn't an option..."
;;
esac
done
while true
do
read -p "Enter The Directory Where you want to install Wordpress: " INSTALL_DIR
if [ -d "$INSTALL_DIR" ]; then
echo "The Directory $INSTALL_DIR Already Exist"
sleep 1
else
mkdir -p $INSTALL_DIR
echo "creating $INSTALL_DIR"
break
fi
done
wget -O latest.zip https://wordpress.org/latest.zip
apt install unzip -y
unzip latest.zip -d $INSTALL_DIR
cp -r $INSTALL_DIR/wordpress/* $INSTALL_DIR
rm -rf $INSTALL_DIR/wordpress
rm -rf latest.zip