main
Robert 2 years ago
parent 61fdaaf76d
commit 5ad597a9f7
  1. 2
      README.md
  2. 2
      app/neato.php
  3. 2
      build/compile-phar.php
  4. 20
      build/install_neato.sh
  5. 13
      build/make-sums.sh
  6. 0
      build/neato_deploy.sh
  7. 0
      build/neato_deploy_php_cli.ini
  8. 0
      build/neato_php_cli_phar.ini
  9. 5
      make-installer.sh

@ -1,5 +1,5 @@
# neatoDeploy
$ ./selftar.sh
$ ./make-installer.sh
Then scp over the neato_deploy.tar.gz.self to your sever.

@ -94,7 +94,7 @@ if (file_exists($cwd . '/deploy_' . $file.'.php')) {
}
if ($skipdeploy) {
echo "Skipping Deploy php file...";
echo "Skipping Deploy php file...\r\n";
exit(0);
}

@ -21,7 +21,7 @@ $phar->startBuffering();
$defaultStub = $phar->createDefaultStub('neato.php');
// Add the rest of the apps files
$phar->buildFromDirectory(__DIR__ . '/app');
$phar->buildFromDirectory(__DIR__ . '/../app');
// Customize the stub to add the shebang
$stub = "\n" . $defaultStub;

@ -1,6 +1,6 @@
#!/bin/bash
PHPCLI='php8.2-cli'
PHPCLI='php8.3-cli'
if [ "$EUID" -ne 0 ]; then
echo "Please run as root!"
@ -11,14 +11,16 @@ 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!"
echo "Do not run this script inside of source folder /opt/neatoDeploy/build!"
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/
mv neato_deploy_php_cli.ini /opt/neatoDeployments/
mv neatoDeploy.phar /opt/neatoDeployments/
mv neato_deploy.sh /opt/neatoDeployments/
mv make-sums.sh /opt/neatoDeployments/
cp config_files/deploy_*.php /opt/neatoDeployments/
pushd /opt/neatoDeployments
@ -29,16 +31,16 @@ pushd /opt/neatoDeployments
/usr/bin/dpkg -s curl 2>/dev/null >/dev/null || /usr/bin/apt-get install -y curl
chown www-data:www-data neato*
chown www-data:www-data make-sums.sh
chown www-data:www-data deploy_*.php
chmod 775 neatoDeploy.phar
chmod 775 neato_deploy.sh
chmod 775 make-sums.sh
chmod 664 neato_deploy_php_cli.ini
chmod 664 deploy_*.php
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!"

@ -0,0 +1,13 @@
#!/bin/bash
for file in deploy_*.php; do
if [ -f "$file" ]; then
echo -e "Making sum file for: $file \r\n"
# Remove "deploy_" from the beginning and ".php" from the end
new_file_name=$(echo "$file" | sed 's/^deploy_//;s/\.php$//')
php -c /opt/neatoDeployments/neatoDeploy.ini -f /opt/neatoDeployments/neatoDeploy.phar "$new_file_name" -marksafe -skipdeploy
fi
done

@ -1,10 +1,11 @@
#!/bin/bash
pushd build
/usr/bin/php -c neato_php_cli_phar.ini -f compile-phar.php
chmod +x install_neato.sh
TAR_FILE=neato_deploy.tar.gz
tar -czvf $TAR_FILE install_neato.sh neatoDeploy.phar neato_deploy_php_cli.ini neato_deploy.sh
tar -czvf $TAR_FILE install_neato.sh make-sums.sh neatoDeploy.phar neato_deploy_php_cli.ini neato_deploy.sh ../config_files/deploy_*.php
EXIT_COMMAND="./install_neato.sh"
@ -16,3 +17,5 @@ echo "$EXIT_COMMAND; exit" >> $SELF_EXTRACTABLE
cat $TAR_FILE >> $SELF_EXTRACTABLE
chmod a+x $SELF_EXTRACTABLE
mv $SELF_EXTRACTABLE ..
popd
Loading…
Cancel
Save