1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/digiscreen_ynh.git synced 2024-09-03 18:26:15 +02:00
This commit is contained in:
Éric Gaspar 2024-09-01 17:11:14 +02:00
parent 4d6f3d8c5f
commit 519781b6c3
5 changed files with 6 additions and 32 deletions

View file

@ -20,7 +20,7 @@ userdoc = "https://ladigitale.dev/blog/digiscreen-un-fond-d-ecran-interactif-pou
code = "https://codeberg.org/ladigitale/digiscreen" code = "https://codeberg.org/ladigitale/digiscreen"
[integration] [integration]
yunohost = ">= 11.2.18" yunohost = ">= 11.2.29"
helpers_version = "2.1" helpers_version = "2.1"
architectures = "all" architectures = "all"
multi_instance = true multi_instance = true

View file

@ -15,15 +15,11 @@ ynh_nodejs_install
#================================================= #=================================================
ynh_script_progression "Setting up source files..." ynh_script_progression "Setting up source files..."
# Download, check integrity, uncompress and patch the source
ynh_setup_source --dest_dir="$install_dir/source" ynh_setup_source --dest_dir="$install_dir/source"
# Patch broken dependency # Patch broken dependency
sed -i 's|"v-calendar": "^2.3.0"|"v-calendar": "2.3.0"|' "$install_dir/source/package.json" sed -i 's|"v-calendar": "^2.3.0"|"v-calendar": "2.3.0"|' "$install_dir/source/package.json"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 750 "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir"
#================================================= #=================================================
# NODEJS BUILD # NODEJS BUILD
#================================================= #=================================================
@ -33,25 +29,20 @@ pushd "$install_dir/source"
echo VUE_APP_PIXABAY_API_KEY="$api_key_pixabay" >> .env echo VUE_APP_PIXABAY_API_KEY="$api_key_pixabay" >> .env
echo VUE_APP_GOOGLE_API_KEY="$api_key_google_youtube" >> .env echo VUE_APP_GOOGLE_API_KEY="$api_key_google_youtube" >> .env
ynh_exec_as_app node_load_PATH" npm install ynh_exec_as_app npm install
ynh_exec_as_app node_load_PATH" npm run build ynh_exec_as_app npm run build
popd popd
mv "$install_dir/source/dist" "$install_dir/www" mv "$install_dir/source/dist" "$install_dir/www"
ynh_safe_rm "$install_dir/source" ynh_safe_rm "$install_dir/source"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 750 "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir"
#================================================= #=================================================
# SYSTEM CONFIGURATION # SYSTEM CONFIGURATION
#================================================= #=================================================
ynh_script_progression "Adding system configurations related to $app..." ynh_script_progression "Adding system configurations related to $app..."
# Create a dedicated NGINX config
ynh_config_add_nginx ynh_config_add_nginx
# Create a dedicated PHP-FPM config
ynh_config_add_phpfpm ynh_config_add_phpfpm
#================================================= #=================================================

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
@ -8,14 +8,10 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
ynh_script_progression "Removing system configurations related to $app..." ynh_script_progression "Removing system configurations related to $app..."
# Remove the dedicated NGINX config
ynh_config_remove_nginx ynh_config_remove_nginx
# Remove the dedicated PHP-FPM config
ynh_config_remove_phpfpm ynh_config_remove_phpfpm
# Remove the log files
#================================================= #=================================================
# REMOVE NODEJS # REMOVE NODEJS
#================================================= #=================================================

View file

@ -1,6 +1,5 @@
#!/bin/bash #!/bin/bash
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
@ -11,9 +10,6 @@ ynh_script_progression "Restoring the app main directory..."
ynh_restore "$install_dir" ynh_restore "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 750 "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir"
#================================================= #=================================================
# RESTORE SYSTEM CONFIGURATIONS # RESTORE SYSTEM CONFIGURATIONS
#================================================= #=================================================

View file

@ -32,15 +32,11 @@ ynh_nodejs_install
#================================================= #=================================================
ynh_script_progression "Upgrading source files..." ynh_script_progression "Upgrading source files..."
# Download, check integrity, uncompress and patch the source
ynh_setup_source --dest_dir="$install_dir/source" --full_replace ynh_setup_source --dest_dir="$install_dir/source" --full_replace
# Patch broken dependency # Patch broken dependency
sed -i 's|"v-calendar": "^2.3.0"|"v-calendar": "2.3.0"|' "$install_dir/source/package.json" sed -i 's|"v-calendar": "^2.3.0"|"v-calendar": "2.3.0"|' "$install_dir/source/package.json"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 750 "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir"
#================================================= #=================================================
# NODEJS BUILD # NODEJS BUILD
#================================================= #=================================================
@ -50,26 +46,21 @@ pushd "$install_dir/source"
echo VUE_APP_PIXABAY_API_KEY="$api_key_pixabay" >> .env echo VUE_APP_PIXABAY_API_KEY="$api_key_pixabay" >> .env
echo VUE_APP_GOOGLE_API_KEY="$api_key_google_youtube" >> .env echo VUE_APP_GOOGLE_API_KEY="$api_key_google_youtube" >> .env
ynh_exec_as_app node_load_PATH" npm install ynh_exec_as_app npm install
ynh_exec_as_app node_load_PATH" npm run build ynh_exec_as_app npm run build
popd popd
ynh_safe_rm "$install_dir/www" ynh_safe_rm "$install_dir/www"
mv "$install_dir/source/dist" "$install_dir/www" mv "$install_dir/source/dist" "$install_dir/www"
ynh_safe_rm "$install_dir/source" ynh_safe_rm "$install_dir/source"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 750 "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir"
#================================================= #=================================================
# REAPPLY SYSTEM CONFIGURATIONS # REAPPLY SYSTEM CONFIGURATIONS
#================================================= #=================================================
ynh_script_progression "Upgrading system configurations related to $app..." ynh_script_progression "Upgrading system configurations related to $app..."
# Create a dedicated NGINX config
ynh_config_add_nginx ynh_config_add_nginx
# Create a dedicated PHP-FPM config
ynh_config_add_phpfpm ynh_config_add_phpfpm
#================================================= #=================================================