PHP Deployment Scripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
neatoDeploy/install_neato.sh

44 lines
1.1 KiB

#!/bin/bash
PHPCLI='php8.2-cli'
if [ "$EUID" -ne 0 ]; then
echo "Please run as root!"
exit
fi
current_directory=$(pwd)
target_directory="/opt/neatoDeploy"
if [ "$current_directory" == "$target_directory" ]; then
echo "Do not run this script inside of source folder /opt/neatoDeploy!"
exit 1
fi
mkdir -p /opt/neatoDeployments
cp neato_deploy_php_cli.ini /opt/neatoDeployments/
cp neatoDeploy.phar /opt/neatoDeployments/
cp neato_deploy.sh /opt/neatoDeployments/
pushd /opt/neatoDeployments
/usr/bin/apt-get install -y software-properties-common
/usr/bin/add-apt-repository ppa:ondrej/php -y
/usr/bin/apt-get update
/usr/bin/dpkg -s $PHPCLI 2>/dev/null >/dev/null || /usr/bin/apt-get install -y $PHPCLI
/usr/bin/dpkg -s curl 2>/dev/null >/dev/null || /usr/bin/apt-get install -y curl
chown www-data:www-data neato*
chmod 775 neatoDeploy.phar
chmod 775 neato_deploy.sh
chmod 664 neato_deploy_php_cli.ini
popd
rm neato_deploy_php_cli.ini
rm neatoDeploy.phar
rm neato_deploy.sh
echo -e "\nRemove the install_neato.sh file!"
echo -e "\nRemove the neato_deploy.tar.gz.self file!"