From 422011c15182e41e21a3e0a08e3e7161b7b8409d Mon Sep 17 00:00:00 2001 From: Thibodeau Bruno Date: Wed, 22 Jun 2022 16:26:14 -0400 Subject: [PATCH] correction commandes et controle d'errur de base --- osticket-install.sh | 64 ++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/osticket-install.sh b/osticket-install.sh index efad204..62fd71e 100644 --- a/osticket-install.sh +++ b/osticket-install.sh @@ -14,10 +14,10 @@ cd ~ #install modules de base #dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm -dnf -y module enable php:8.0 -dnf -y in php php-mysqli php-gd php-gettext php-imap php-json php-mbstring php-xml php-apc mariadb-server mariadb nginx php-fpm git - - +dnf -y module enable php:8.0 && \ +dnf -y in php php-mysqli php-gd php-gettext php-imap php-json php-mbstring php-xml php-apc mariadb-server mariadb nginx php-fpm git && \ +\ +\ cat <> /etc/nginx/conf.d/osticket # Rewrite all requests from HTTP to HTTPS server { @@ -82,35 +82,35 @@ cat <> /etc/nginx/conf.d/osticket } } -EOF - - -systemctl enable --now mariadb -systemctl enable --now nginx -systemctl enable --now php-fpm - +EOF && \ +\ +\ +systemctl enable --now mariadb && \ +systemctl enable --now nginx && \ +systemctl enable --now php-fpm && \ +\ #copie de la source -git clone https://github.com/osTicket/osTicket.git -cd osTicket -git checkout $ostver -git pull - +git clone https://github.com/osTicket/osTicket.git && \ +cd osTicket && \ +git checkout $ostver && \ +git pull && \ +\ #setup / deploiement -mkdir -p $ostdir -chown -R nginx:nginx $ostdir -chmod -R a+rX $ostdir -chmod -R u+rw $ostdir - -php manage.php deploy --setup $ostdir -cd .. - +mkdir -p $ostdir && \ +chown -R nginx:nginx $ostdir && \ +chmod -R a+rX $ostdir && \ +chmod -R u+rw $ostdir && \ +\ +php manage.php deploy --setup $ostdir && \ +cd .. && \ +\ # Setup Official Plugins -git clone -b develop https://github.com/osTicket/osTicket-plugins $ostpluginsrc -cd $ostpluginsrc -php make.php hydrate -for plugin in $(find * -maxdepth 0 -type d ! -path doc ! -path lib); do cp -r ${plugin} $ostdir/include/plugins; done; -cp -R $ostpluginsrc/*.phar $ostdir/include/plugins/ -cd ~ +git clone -b develop https://github.com/osTicket/osTicket-plugins $ostpluginsrc && \ +cd $ostpluginsrc && \ +php make.php hydrate && \ +for plugin in $(find * -maxdepth 0 -type d ! -path doc ! -path lib); do cp -r ${plugin} $ostdir/include/plugins; done; && \ +cp -R $ostpluginsrc/*.phar $ostdir/include/plugins/ && \ +cd ~ && \ # Add Community Plugins ## Archiver git clone https://github.com/clonemeagain/osticket-plugin-archiver $ostdir/include/plugins/archiver && \ @@ -139,9 +139,7 @@ cd ~ \ ### Log Miscellany Installation touch /var/log/msmtp.log && \ - chown nginx:nginx /var/log/msmtp.log && \ - - + chown nginx:nginx /var/log/msmtp.log ##update