main
Robert 2 years ago
parent 786a17fc61
commit 912fdfa49c
  1. 1
      .gitignore
  2. 3
      app/just_testing.sh
  3. 20
      build/install_neato.sh
  4. 5
      make-installer.sh

1
.gitignore vendored

@ -9,6 +9,7 @@ neatoDeploy.phar
neato_deploy.tar.gz.self neato_deploy.tar.gz.self
phpstan.neon phpstan.neon
composer.lock composer.lock
app/sumfiles.sig
build/neatoDeploy.phar.pubkey build/neatoDeploy.phar.pubkey
build/neatoDeploy.phar.sig build/neatoDeploy.phar.sig
build/private.pem build/private.pem

@ -2,5 +2,8 @@
if [ ! -L deploy_files ]; then if [ ! -L deploy_files ]; then
ln -s ../deploy_files . ln -s ../deploy_files .
fi fi
if [ ! -L sumfiles.sig ]; then
ln -s ../build/sumfiles.sig .
fi
php -c build/neato_deploy_php_cli.ini -f neato.php $@ php -c build/neato_deploy_php_cli.ini -f neato.php $@

@ -1,5 +1,19 @@
#!/bin/bash #!/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' PHPCLI='php8.3-cli'
PHPMBString='php8.3-mbstring' 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 $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/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/chgrp $MY_GROUP neato*
/usr/bin/chown www-data:www-data make-sums.sh /usr/bin/chgrp $MY_GROUP make-sums.sh
/usr/bin/chown -R www-data:www-data deploy_files /usr/bin/chgrp -R $MY_GROUP deploy_files
/usr/bin/chmod 775 neatoDeploy.phar /usr/bin/chmod 775 neatoDeploy.phar
/usr/bin/chmod 775 neato_deploy.sh /usr/bin/chmod 775 neato_deploy.sh

@ -21,6 +21,11 @@ if [ ! -f "sumfiles.sig" ]; then
generate_password generate_password
fi fi
if ! which "openssl" >/dev/null 2>&1; then
echo "openssl is not installed!"
exit 3
fi
if [ ! -f "private.pem" ]; then if [ ! -f "private.pem" ]; then
openssl genrsa -out private.pem 4096 openssl genrsa -out private.pem 4096
openssl rsa -in private.pem -pubout -out neatoDeploy.phar.pubkey openssl rsa -in private.pem -pubout -out neatoDeploy.phar.pubkey

Loading…
Cancel
Save