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.
104 lines
3.6 KiB
104 lines
3.6 KiB
#!/bin/bash
|
|
|
|
#Pensé pour Fedora 36
|
|
|
|
|
|
############################
|
|
#VARS
|
|
ostver="v1.16.3"
|
|
ostdir="/var/www/osticket"
|
|
ostpluginsrc="/usr/src/osticket/plugins"
|
|
webuser="nginx"
|
|
webgroup="nginx"
|
|
basedir=$PWD
|
|
############################
|
|
|
|
cd ~
|
|
#dnf -y in php php-intl php-zip php-mysqli php-gd php-gettext php-json php-mbstring php-xml php-pecl-apcu mariadb-server mariadb nginx php-fpm git && \
|
|
|
|
|
|
dnf install http://rpms.remirepo.net/fedora/remi-release-36.rpm -y && \
|
|
dnf remove -y php* && \
|
|
dnf module list reset php -y && \
|
|
dnf module list php && \
|
|
dnf module enable php:remi-8.0 -y
|
|
\
|
|
dnf -y in php php-intl php-imap php-zip php-mysqli php-gd php-gettext php-json php-mbstring php-xml php-pecl-apcu mariadb-server mariadb nginx php-fpm git && \
|
|
\
|
|
\
|
|
cp $basedir/nginx-conf/osticket.conf /etc/nginx/conf.d/. && \
|
|
\
|
|
\
|
|
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 fetch && \
|
|
\
|
|
#setup / deploiement
|
|
mkdir -p $ostdir && \
|
|
#chown -R $webuser:$webgroup $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 ~ && \
|
|
# Add Community Plugins
|
|
## Archiver
|
|
git clone https://github.com/clonemeagain/osticket-plugin-archiver $ostdir/include/plugins/archiver && \
|
|
## Attachment Preview
|
|
git clone https://github.com/clonemeagain/attachment_preview $ostdir/include/plugins/attachment-preview && \
|
|
## Auto Closer
|
|
git clone https://github.com/clonemeagain/plugin-autocloser $ostdir/include/plugins/auto-closer && \
|
|
## Fetch Note
|
|
git clone https://github.com/bkonetzny/osticket-fetch-note $ostdir/include/plugins/fetch-note && \
|
|
## Field Radio Buttons
|
|
git clone https://github.com/Micke1101/OSTicket-plugin-field-radiobuttons $ostdir/include/plugins/field-radiobuttons && \
|
|
## Mentioner
|
|
git clone https://github.com/clonemeagain/osticket-plugin-mentioner $ostdir/include/plugins/mentioner && \
|
|
## Multi LDAP Auth
|
|
git clone https://github.com/philbertphotos/osticket-multildap-auth $ostdir/include/plugins/multi-ldap && \
|
|
mv $ostdir/include/plugins/multi-ldap/multi-ldap/* $ostdir/include/plugins/multi-ldap/ && \
|
|
rm -rf $ostdir/include/plugins/multi-ldap/multi-ldap && \
|
|
## Prevent Autoscroll
|
|
git clone https://github.com/clonemeagain/osticket-plugin-preventautoscroll $ostdir/include/plugins/prevent-autoscroll && \
|
|
## Rewriter
|
|
git clone https://github.com/clonemeagain/plugin-fwd-rewriter $ostdir/include/plugins/rewriter && \
|
|
## Slack
|
|
git clone https://github.com/clonemeagain/osticket-slack $ostdir/include/plugins/slack && \
|
|
## Teams (Microsoft)
|
|
git clone https://github.com/ipavlovi/osTicket-Microsoft-Teams-plugin $ostdir/include/plugins/teams && \
|
|
\
|
|
### Log Miscellany Installation
|
|
touch /var/log/msmtp.log && \
|
|
chown $webuser:$webgroup /var/log/msmtp.log && \
|
|
\
|
|
mv /var/www/osticket/include/ost-sampleconfig.php /var/www/osticket/include/ost-config.php && \
|
|
chmod 0666 /var/www/osticket/include/ost-config.php
|
|
chown -R $webuser:$webgroup $ostdir && \
|
|
\
|
|
echo "fin"
|
|
|
|
|
|
|
|
|
|
##update
|
|
#git pull
|
|
#php manage.php deploy -v $ostdir
|
|
|
|
|
|
##upgrade nouvelle version
|
|
#futur!
|