mirror of
https://github.com/YunoHost-Apps/codimd_ynh.git
synced 2024-09-03 18:16:32 +02:00
Fix
This commit is contained in:
parent
98b38573b0
commit
bb593ea42f
5 changed files with 22 additions and 20 deletions
|
@ -31,7 +31,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
db_user=$db_name
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
||||
|
||||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
|
@ -113,7 +113,7 @@ fi
|
|||
ynh_backup_if_checksum_is_different --file="$final_path/config.json"
|
||||
|
||||
domain=$new_domain
|
||||
path_url=$new_path
|
||||
path_url=${path_url:1}
|
||||
|
||||
cp ../conf/config.json.example "$final_path/config.json"
|
||||
|
||||
|
@ -135,7 +135,7 @@ ynh_store_file_checksum --file="$final_path/config.json"
|
|||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="HTTP Server listening"
|
||||
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="HTTP Server listening"
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
|
@ -117,7 +117,7 @@ ynh_script_progression --message="Building CodiMD... (this will take some time a
|
|||
|
||||
pushd "$final_path" || ynh_die
|
||||
ynh_use_nodejs
|
||||
bin/setup
|
||||
ynh_exec_warn_less bin/setup
|
||||
ynh_exec_warn_less yarn run build
|
||||
popd || ynh_die
|
||||
|
||||
|
@ -152,6 +152,7 @@ ynh_script_progression --message="Securing files and directories..."
|
|||
chown -R $app:$app $final_path
|
||||
chmod o-rwx $final_path
|
||||
chmod 600 $final_path/config.json
|
||||
chmod 600 $final_path/.sequelizerc
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
|
@ -166,12 +167,12 @@ yunohost service add $app --description="Collaborative Markdown notes" --log="/v
|
|||
ynh_script_progression --message="Starting a systemd service..." --weight=2
|
||||
|
||||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="HTTP Server listening"
|
||||
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="HTTP Server listening"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring SSOwat..." --weight=1
|
||||
ynh_script_progression --message="Configuring permissions..." --weight=1
|
||||
|
||||
# Make app public if necessary or protect it
|
||||
if [ $is_public -eq 1 ]
|
||||
|
|
|
@ -17,10 +17,9 @@ ynh_script_progression --message="Loading installation settings..." --weight=1
|
|||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
port=$(ynh_app_setting_get --app=$app --key=port)
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
db_user=$db_name
|
||||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
|
||||
#=================================================
|
||||
# STANDARD REMOVE
|
||||
|
|
|
@ -31,7 +31,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
|
|||
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||
db_name=$(ynh_app_setting_get --app=$app --key=db_name)
|
||||
db_user=$db_name
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd)
|
||||
db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd)
|
||||
|
||||
#=================================================
|
||||
# CHECK IF THE APP CAN BE RESTORED
|
||||
|
@ -74,6 +74,7 @@ ynh_script_progression --message="Restoring user rights..."
|
|||
|
||||
# Restore permissions on app files
|
||||
chown -R $app:$app $final_path
|
||||
chmod o-rwx $final_path
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
|
@ -83,7 +84,7 @@ chown -R $app:$app $final_path
|
|||
ynh_script_progression --message="Reinstalling dependencies..." --weight=7
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
# Install Nodejs
|
||||
ynh_exec_warn_less ynh_install_nodejs --nodejs_version=$nodejs_version
|
||||
|
@ -120,7 +121,7 @@ yunohost service add $app --description="Collaborative Markdown notes" --log="/v
|
|||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="HTTP Server listening"
|
||||
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="HTTP Server listening"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -135,7 +135,7 @@ then
|
|||
|
||||
pushd "$final_path" || ynh_die
|
||||
ynh_use_nodejs
|
||||
bin/setup
|
||||
ynh_exec_warn_less bin/setup
|
||||
ynh_exec_warn_less yarn run build
|
||||
popd || ynh_die
|
||||
fi
|
||||
|
@ -143,10 +143,10 @@ fi
|
|||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Modifying a config file..." --weight=2
|
||||
#ynh_script_progression --message="Modifying a config file..." --weight=2
|
||||
|
||||
path=${path_url:1}
|
||||
ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config.json"
|
||||
#path=${path_url:1}
|
||||
#ynh_add_config --template="../conf/config.json.example" --destination="$final_path/config.json"
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
|
@ -168,6 +168,7 @@ ynh_script_progression --message="Securing files and directories..." --weight=1
|
|||
|
||||
# Set permissions on app files
|
||||
chown -R $app:$app $final_path
|
||||
chmod o-rwx $final_path
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
|
@ -181,7 +182,7 @@ yunohost service add $app --description="Collaborative Markdown notes" --log="/v
|
|||
#=================================================
|
||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="HTTP Server listening"
|
||||
ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="HTTP Server listening"
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
|
|
Loading…
Reference in a new issue