1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/luckysheet_ynh.git synced 2024-09-03 19:36:21 +02:00
This commit is contained in:
ericgaspar 2022-01-01 21:54:34 +01:00
parent d48461cbf1
commit d7606f928a
5 changed files with 24 additions and 34 deletions

View file

@ -1,5 +1,5 @@
SOURCE_URL=https://github.com/mengshukeji/Luckysheet/archive/v2.0.0.tar.gz
SOURCE_SUM=697e79a4d033506074f8e0261ff94cee6e4360b7f0634cb9de53ae59edcec1fe
SOURCE_URL=https://github.com/mengshukeji/Luckysheet/archive/v2.1.3.tar.gz
SOURCE_SUM=7c90d5e5ab1e80fedda0f22c0f5bd52bccc26368d1fbb0c774dc4681fee7a923
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true

View file

@ -6,7 +6,7 @@
"en": "Online spreadsheet that is powerful, simple to configure",
"fr": "Feuille de calcul en ligne, puissante, simple à configurer"
},
"version": "2.0.0~ynh4",
"version": "2.1.3~ynh1",
"url": "https://github.com/mengshukeji/Luckysheet",
"license": "MIT",
"maintainer": {

View file

@ -84,6 +84,10 @@ 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
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -109,7 +113,7 @@ popd
# MODIFY A CONFIG FILE
#=================================================
cp ../conf/config.example.js $final_path/src/config.js
ynh_add_config --template="../conf/config.example.js" --destination="$final_path/src/config.js"
#=================================================
# SETUP SYSTEMD
@ -117,20 +121,9 @@ cp ../conf/config.example.js $final_path/src/config.js
ynh_script_progression --message="Configuring a systemd service..." --weight=1
ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service"
ynh_replace_string --match_string="__YNH_NPM__" --replace_string="$ynh_npm" --target_file="../conf/systemd.service"
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
ynh_script_progression --message="Securing files and directories..." --weight=1
# Set permissions to app files
chown -R $app: $final_path
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================

View file

@ -46,20 +46,24 @@ ynh_script_progression --message="Restoring the NGINX configuration..." --weight
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring Luckysheet main directory..." --weight=50
ynh_restore_file --origin_path="$final_path"
#=================================================
# 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
ynh_system_user_create --username=$app --home_dir=$final_path
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
ynh_script_progression --message="Restoring Luckysheet main directory..." --weight=5
ynh_restore_file --origin_path="$final_path"
chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# RESTORE USER RIGHTS

View file

@ -24,7 +24,6 @@ port=$(ynh_app_setting_get --app=$app --key=port)
#=================================================
# CHECK VERSION
#=================================================
ynh_script_progression --message="Checking version..."
upgrade_type=$(ynh_check_app_version_changed)
@ -86,6 +85,10 @@ 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"
#=================================================
# NGINX CONFIGURATION
#=================================================
@ -128,16 +131,6 @@ ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --targ
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# SECURE FILES AND DIRECTORIES
#=================================================
ynh_script_progression --message="Securing files and directories..." --weight=1
# Set permissions on app files
chown -R $app: $final_path
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================