|
|
|
|
@ -1,5 +1,19 @@ |
|
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
|
|
MY_GROUP=www-data |
|
|
|
|
# Function to check if a group exists |
|
|
|
|
group_exists() { |
|
|
|
|
if getent group "$1" >/dev/null 2>&1; then |
|
|
|
|
return 0 # Group exists |
|
|
|
|
else |
|
|
|
|
return 1 # Group does not exist |
|
|
|
|
fi |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if ! group_exists "$MY_GROUP"; then |
|
|
|
|
groupadd "$MY_GROUP" |
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
PHPCLI='php8.3-cli' |
|
|
|
|
PHPMBString='php8.3-mbstring' |
|
|
|
|
|
|
|
|
|
@ -36,9 +50,9 @@ pushd /opt/neatoDeployments |
|
|
|
|
/usr/bin/dpkg -s $PHPMBString 2>/dev/null >/dev/null || /usr/bin/apt-get install -y $PHPMBString |
|
|
|
|
/usr/bin/dpkg -s curl 2>/dev/null >/dev/null || /usr/bin/apt-get install -y curl |
|
|
|
|
|
|
|
|
|
/usr/bin/chown www-data:www-data neato* |
|
|
|
|
/usr/bin/chown www-data:www-data make-sums.sh |
|
|
|
|
/usr/bin/chown -R www-data:www-data deploy_files |
|
|
|
|
/usr/bin/chgrp $MY_GROUP neato* |
|
|
|
|
/usr/bin/chgrp $MY_GROUP make-sums.sh |
|
|
|
|
/usr/bin/chgrp -R $MY_GROUP deploy_files |
|
|
|
|
|
|
|
|
|
/usr/bin/chmod 775 neatoDeploy.phar |
|
|
|
|
/usr/bin/chmod 775 neato_deploy.sh |
|
|
|
|
|