forked from Sophia/thelinuxlist
Add 'scripts/wpinstall.sh'
This commit is contained in:
parent
63d7dd3845
commit
8f82bb22bd
|
@ -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
|
Loading…
Reference in New Issue