added unattended installs, and bumped golang ver
This commit is contained in:
28
scripts/unattended/wpinstall.sh
Normal file
28
scripts/unattended/wpinstall.sh
Normal file
@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
trap 'exit 130' INT
|
||||
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
|
||||
if [ ! -x /usr/bin/curl ] ; then
|
||||
CURL_NOT_EXIST=1
|
||||
apt install -y curl
|
||||
else
|
||||
CURL_NOT_EXIST=0
|
||||
fi
|
||||
curl -fsSL -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
|
||||
chmod -R 775 $INSTALL_DIR
|
Reference in New Issue
Block a user