mirror of
https://github.com/YunoHost-Apps/freescout_ynh.git
synced 2024-09-03 18:36:23 +02:00
commit
aeca36c71a
9 changed files with 28 additions and 11 deletions
|
@ -26,6 +26,10 @@ FreeScout is the super lightweight and powerful free open source help desk and s
|
||||||
|
|
||||||
![Screenshot of FreeScout](./doc/screenshots/screenshot.png)
|
![Screenshot of FreeScout](./doc/screenshots/screenshot.png)
|
||||||
|
|
||||||
|
## :red_circle: Antifeatures
|
||||||
|
|
||||||
|
- **Not totally free upstream**: The packaged app is under an overall free licence, but with clauses that restrict its use.
|
||||||
|
|
||||||
## Documentation and resources
|
## Documentation and resources
|
||||||
|
|
||||||
* Official app website: <https://freescout.net/>
|
* Official app website: <https://freescout.net/>
|
||||||
|
|
|
@ -26,6 +26,10 @@ FreeScout est un service d'assistance open source gratuit ultra léger et puissa
|
||||||
|
|
||||||
![Capture d’écran de FreeScout](./doc/screenshots/screenshot.png)
|
![Capture d’écran de FreeScout](./doc/screenshots/screenshot.png)
|
||||||
|
|
||||||
|
## :red_circle: Fonctions indésirables
|
||||||
|
|
||||||
|
- **Not totally free upstream**: The packaged app is under an overall free licence, but with clauses that restrict its use.
|
||||||
|
|
||||||
## Documentations et ressources
|
## Documentations et ressources
|
||||||
|
|
||||||
* Site officiel de l’app : <https://freescout.net/>
|
* Site officiel de l’app : <https://freescout.net/>
|
||||||
|
|
|
@ -31,7 +31,7 @@ location __PATH__/ {
|
||||||
location ~* ^/(?:css|js)/.*\.(?:css|js)$ {
|
location ~* ^/(?:css|js)/.*\.(?:css|js)$ {
|
||||||
expires 2d;
|
expires 2d;
|
||||||
access_log off;
|
access_log off;
|
||||||
add_header Cache-Control "public, must-revalidate";
|
more_set_headers "Cache-Control: public, must-revalidate";
|
||||||
}
|
}
|
||||||
|
|
||||||
# The list should be in sync with /storage/app/public/uploads/.htaccess and /config/app.php
|
# The list should be in sync with /storage/app/public/uploads/.htaccess and /config/app.php
|
||||||
|
|
|
@ -62,7 +62,7 @@ ram.runtime = "50M"
|
||||||
main.url = "/"
|
main.url = "/"
|
||||||
|
|
||||||
[resources.apt]
|
[resources.apt]
|
||||||
packages = "php8.2-mysql, php8.2-mbstring, php8.2-xml, php8.2-imap, php8.2-zip, php8.2-gd, php8.2-curl, php8.2-intl"
|
packages = "mariadb-server, php8.2-mysql, php8.2-mbstring, php8.2-xml, php8.2-imap, php8.2-zip, php8.2-gd, php8.2-curl, php8.2-intl"
|
||||||
|
|
||||||
[resources.database]
|
[resources.database]
|
||||||
type = "mysql"
|
type = "mysql"
|
||||||
|
|
|
@ -39,7 +39,6 @@ ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/cron.d/$app"
|
ynh_backup --src_path="/etc/cron.d/$app"
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE MYSQL DATABASE
|
# BACKUP THE MYSQL DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -16,6 +16,13 @@ ynh_script_progression --message="Updating NGINX web server configuration..." --
|
||||||
|
|
||||||
ynh_change_url_nginx_config
|
ynh_change_url_nginx_config
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# ADD A CONFIGURATION
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||||
|
|
||||||
|
ynh_replace_string --match_string="APP_URL=https://*" --replace_string="APP_URL=https://$new_domain" --target_file=$install_dir/.env
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -24,7 +24,9 @@ ynh_script_progression --message="Setting up source files..." --weight=1
|
||||||
# Download, check integrity, uncompress and patch the source from manifest.toml
|
# Download, check integrity, uncompress and patch the source from manifest.toml
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
|
||||||
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
usermod -g www-data $app
|
usermod -g www-data $app
|
||||||
find $install_dir -type f -exec chmod 664 {} \;
|
find $install_dir -type f -exec chmod 664 {} \;
|
||||||
find $install_dir -type d -exec chmod 775 {} \;
|
find $install_dir -type d -exec chmod 775 {} \;
|
||||||
|
|
|
@ -17,6 +17,7 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$install_dir"
|
ynh_restore_file --origin_path="$install_dir"
|
||||||
|
|
||||||
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -26,10 +26,13 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
|
ynh_secure_remove --file="/$install_dir/vendor"
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from manifest.toml
|
# Download, check integrity, uncompress and patch the source from manifest.toml
|
||||||
ynh_setup_source --dest_dir="$install_dir" --keep='.env'
|
ynh_setup_source --dest_dir="$install_dir" #--keep='.env'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -46,12 +49,12 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE A CONFIG FILE
|
# UPDATE A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Updating a configuration file..." --weight=1
|
#ynh_script_progression --message="Updating a configuration file..." --weight=1
|
||||||
|
|
||||||
ynh_add_config --template=".env.example" --destination="$install_dir/.env"
|
#ynh_add_config --template=".env.example" --destination="$install_dir/.env"
|
||||||
|
|
||||||
chmod 400 "$install_dir/.env"
|
#chmod 400 "$install_dir/.env"
|
||||||
chown $app:$app "$install_dir/.env"
|
#chown $app:$app "$install_dir/.env"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# FINAL FREESCOUT INSTALL
|
# FINAL FREESCOUT INSTALL
|
||||||
|
@ -59,11 +62,8 @@ chown $app:$app "$install_dir/.env"
|
||||||
ynh_script_progression --message="Install $app" --weight=5
|
ynh_script_progression --message="Install $app" --weight=5
|
||||||
|
|
||||||
pushd $install_dir
|
pushd $install_dir
|
||||||
php$phpversion artisan key:generate --no-interaction --force
|
|
||||||
php$phpversion artisan freescout:clear-cache
|
php$phpversion artisan freescout:clear-cache
|
||||||
php$phpversion artisan storage:link
|
|
||||||
php$phpversion artisan migrate --no-interaction --force
|
php$phpversion artisan migrate --no-interaction --force
|
||||||
php$phpversion artisan freescout:create-user --role=admin --firstName="$firstname" --lastName="$lastname" --email="$email" --password="$password" --no-interaction
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue