mirror of
https://github.com/YunoHost-Apps/mautic_ynh.git
synced 2024-09-03 19:36:26 +02:00
4.0.0
This commit is contained in:
parent
776f7e7e0b
commit
0e98e29394
6 changed files with 53 additions and 75 deletions
|
@ -1,11 +1,8 @@
|
|||
# See here for more information
|
||||
# https://github.com/YunoHost/package_check#syntax-check_process-file
|
||||
|
||||
;; Test complet
|
||||
; Manifest
|
||||
domain="domain.tld" (DOMAIN)
|
||||
path="/path" (PATH)
|
||||
is_public=1 (PUBLIC|public=1|private=0)
|
||||
domain="domain.tld"
|
||||
path="/path"
|
||||
is_public=1
|
||||
; Checks
|
||||
pkg_linter=1
|
||||
setup_sub_dir=1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
SOURCE_URL=https://github.com/mautic/mautic/releases/download/3.3.2/3.3.2.zip
|
||||
SOURCE_SUM=58666c42b8fbe0284c7e4cf80228abb05448cfe8932bda2d7e9d64c6d65a1fe8
|
||||
SOURCE_URL=https://github.com/mautic/mautic/releases/download/4.0.0-beta/4.0.0-beta.zip
|
||||
SOURCE_SUM=aae03f6e283f5bf64024256eb7b7a81d2df84e4be4f12d5aaa76cc491d0e0e7f
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=false
|
||||
SOURCE_FILENAME=3.3.2.zip
|
||||
SOURCE_FILENAME=4.0.0-beta.zip
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Open Source Marketing Automation Software.",
|
||||
"fr": "Logiciel d'automatisation marketing open source."
|
||||
},
|
||||
"version": "3.3.2~ynh1",
|
||||
"version": "4.0.0~ynh1",
|
||||
"url": "https://www.mautic.org/",
|
||||
"license": "GPL-3.0-only",
|
||||
"maintainer": {
|
||||
|
@ -14,7 +14,7 @@
|
|||
"email": ""
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.1.7"
|
||||
"yunohost": ">= 4.2.4"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
|
|
@ -45,6 +45,14 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
|
|||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring system user..." --weight=1
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# CREATE A MYSQL DATABASE
|
||||
#=================================================
|
||||
|
@ -63,7 +71,15 @@ ynh_script_progression --message="Setting up source files..." --weight=2
|
|||
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
#cp -r ../sources $final_path
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
chmod -R g+w $final_path/app/config/
|
||||
chmod -R g+w $final_path/media/files/
|
||||
chmod -R g+w $final_path/media/images/
|
||||
chmod -R g+w $final_path/translations/
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
|
@ -73,14 +89,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring system user..." --weight=1
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -90,28 +98,12 @@ ynh_script_progression --message="Configuring PHP-FPM..." --weight=1
|
|||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R $app:www-data $final_path
|
||||
#chmod -R g+w $final_path/app/cache/
|
||||
#chmod -R g+w $final_path/app/logs/
|
||||
chmod -R g+w $final_path/app/config/
|
||||
chmod -R g+w $final_path/media/files/
|
||||
chmod -R g+w $final_path/media/images/
|
||||
chmod -R g+w $final_path/translations/
|
||||
|
||||
#=================================================
|
||||
# SETUP A CRON
|
||||
#=================================================
|
||||
ynh_script_progression --message="Setuping a cron..."
|
||||
|
||||
ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app"
|
||||
|
||||
chmod 644 "/etc/cron.d/$app"
|
||||
|
||||
# #=================================================
|
||||
|
|
|
@ -52,6 +52,14 @@ test ! -d $final_path \
|
|||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
|
||||
|
||||
# Create the dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
|
@ -59,22 +67,10 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
|||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Recreating the dedicated system user..." --weight=1
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
# Create the dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app
|
||||
|
||||
#=================================================
|
||||
# RESTORE USER RIGHTS
|
||||
#=================================================
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R $app:www-data $final_path
|
||||
#chmod -R g+w $final_path/app/cache/
|
||||
#chmod -R g+w $final_path/app/logs/
|
||||
chmod -R g+w $final_path/app/config/
|
||||
chmod -R g+w $final_path/media/files/
|
||||
chmod -R g+w $final_path/media/images/
|
||||
|
|
|
@ -65,6 +65,14 @@ ynh_clean_setup () {
|
|||
# Exit if an error occurs during the execution of the script
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring system user..." --weight=1
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
#=================================================
|
||||
|
@ -77,6 +85,15 @@ then
|
|||
ynh_setup_source --dest_dir="$final_path"
|
||||
fi
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
||||
chmod -R g+w $final_path/app/config/
|
||||
chmod -R g+w $final_path/media/files/
|
||||
chmod -R g+w $final_path/media/images/
|
||||
chmod -R g+w $final_path/translations/
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -85,14 +102,6 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -101,22 +110,6 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2
|
|||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R $app:www-data $final_path
|
||||
#chmod -R g+w $final_path/app/cache/
|
||||
#chmod -R g+w $final_path/app/logs/
|
||||
chmod -R g+w $final_path/app/config/
|
||||
chmod -R g+w $final_path/media/files/
|
||||
chmod -R g+w $final_path/media/images/
|
||||
chmod -R g+w $final_path/translations/
|
||||
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue