mirror of
https://github.com/YunoHost-Apps/cryptpad_ynh.git
synced 2024-09-03 18:26:14 +02:00
cleaning
This commit is contained in:
parent
051b091bd6
commit
f363b7c4d4
2 changed files with 12 additions and 27 deletions
|
@ -68,7 +68,6 @@ ynh_script_progression --message="Adding system configurations related to $app..
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
env_path="$PATH"
|
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
|
|
|
@ -17,10 +17,11 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||||
email=$(ynh_user_get_info --username=$admin --key=mail)
|
email=$(ynh_user_get_info --username=$admin --key=mail)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CHECK VERSION
|
# UPGRADE DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading dependencies..." --weight=6
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
|
@ -34,17 +35,13 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
then
|
ynh_setup_source --dest_dir="$install_dir" #--keep="config/config.js"
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
|
||||||
ynh_setup_source --dest_dir="$install_dir" #--keep="config/config.js"
|
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:$app "$install_dir"
|
chown -R $app:$app "$install_dir"
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# APPLY FOLDER GROUP RIGHTS FOR WWW-DATA
|
# APPLY FOLDER GROUP RIGHTS FOR WWW-DATA
|
||||||
|
@ -88,13 +85,10 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
env_path="$PATH"
|
# Create a dedicated systemd config
|
||||||
#=================================================
|
ynh_add_systemd_config
|
||||||
# UPGRADE DEPENDENCIES
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Upgrading dependencies..." --weight=6
|
|
||||||
|
|
||||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
yunohost service add $app --description="Zero Knowledge realtime collaborative editor" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL CRYPTPAD
|
# INSTALL CRYPTPAD
|
||||||
|
@ -108,20 +102,12 @@ pushd "$install_dir"
|
||||||
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm run build
|
ynh_exec_warn_less sudo -u $app env $ynh_node_load_PATH $ynh_npm run build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CREATE SYSTEMD SERVICE
|
|
||||||
#=================================================
|
|
||||||
# Create a dedicated systemd config
|
|
||||||
ynh_add_systemd_config
|
|
||||||
|
|
||||||
yunohost service add $app --description="Zero Knowledge realtime collaborative editor" --log="/var/log/$app/$app.log"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# ADD UPGRADED CONFIG WITH SANDBOX
|
# ADD UPGRADED CONFIG WITH SANDBOX
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Updating a configuration file..." --weight=1
|
ynh_script_progression --message="Updating a configuration file..." --weight=1
|
||||||
|
|
||||||
ynh_add_config --template="../conf/config.js" --destination="$install_dir/config/config.js"
|
ynh_add_config --template="config.js" --destination="$install_dir/config/config.js"
|
||||||
|
|
||||||
chmod 600 "$install_dir/config/config.js"
|
chmod 600 "$install_dir/config/config.js"
|
||||||
chown $app "$install_dir/config/config.js"
|
chown $app "$install_dir/config/config.js"
|
||||||
|
|
Loading…
Reference in a new issue