mirror of
https://github.com/YunoHost-Apps/codimd_ynh.git
synced 2024-09-03 18:16:32 +02:00
cleaning
This commit is contained in:
parent
b268e0b149
commit
7f070f0694
6 changed files with 5 additions and 21 deletions
|
@ -17,7 +17,7 @@ userdoc = "https://hackmd.io/c/codimd-documentation/%2Fs%2Fcodimd-documentation#
|
||||||
code = "https://github.com/hackmdio/codimd"
|
code = "https://github.com/hackmdio/codimd"
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
yunohost = ">= 11.2.18"
|
yunohost = ">= 11.2.29"
|
||||||
helpers_version = "2.1"
|
helpers_version = "2.1"
|
||||||
architectures = ["amd64"]
|
architectures = ["amd64"]
|
||||||
multi_instance = false
|
multi_instance = false
|
||||||
|
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,6 @@ ynh_config_add --template="config.json.example" --destination="$install_dir/conf
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Starting $app's systemd service..."
|
ynh_script_progression "Starting $app's systemd service..."
|
||||||
|
|
||||||
# Start a systemd service
|
|
||||||
ynh_systemctl --service=$app --action=start --log_path=systemd --wait_until="HTTP Server listening"
|
ynh_systemctl --service=$app --action=start --log_path=systemd --wait_until="HTTP Server listening"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -18,8 +18,6 @@ ynh_script_progression "Setting up source files..."
|
||||||
|
|
||||||
ynh_setup_source --dest_dir=$install_dir
|
ynh_setup_source --dest_dir=$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"
|
|
||||||
chmod +x $install_dir/app.js
|
chmod +x $install_dir/app.js
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -41,7 +39,6 @@ ynh_script_progression "Updating configuration..."
|
||||||
ynh_config_add --template="config.json.example" --destination="$install_dir/config.json"
|
ynh_config_add --template="config.json.example" --destination="$install_dir/config.json"
|
||||||
ynh_config_add --template=".sequelizerc.example" --destination="$install_dir/.sequelizerc"
|
ynh_config_add --template=".sequelizerc.example" --destination="$install_dir/.sequelizerc"
|
||||||
|
|
||||||
#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 600 $install_dir/config.json
|
|
||||||
chmod 600 $install_dir/.sequelizerc
|
chmod 600 $install_dir/.sequelizerc
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -53,8 +50,8 @@ ynh_script_progression "Building CodiMD... (this will take some time and resourc
|
||||||
|
|
||||||
pushd $install_dir
|
pushd $install_dir
|
||||||
|
|
||||||
ynh_hide_warnings ynh_exec_as_app node_load_PATH bin/setup
|
ynh_hide_warnings ynh_exec_as_app bin/setup
|
||||||
ynh_hide_warnings ynh_exec_as_app node_load_PATH npm run build
|
ynh_hide_warnings ynh_exec_as_app npm run build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -10,10 +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 -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"
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC RESTORATION
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REINSTALL DEPENDENCIES
|
# REINSTALL DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -15,17 +15,13 @@ ynh_systemctl --service=$app --action="stop" --log_path="systemd"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Upgrading source files..."
|
ynh_script_progression "Upgrading source files..."
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
|
||||||
ynh_setup_source --dest_dir=$install_dir --keep="config.json .sequelizerc"
|
ynh_setup_source --dest_dir=$install_dir --keep="config.json .sequelizerc"
|
||||||
|
|
||||||
#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"
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE DEPENDENCIES
|
# UPGRADE DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Upgrading dependencies..."
|
ynh_script_progression "Upgrading dependencies..."
|
||||||
|
|
||||||
# Install Nodejs
|
|
||||||
ynh_nodejs_install
|
ynh_nodejs_install
|
||||||
|
|
||||||
#==============================================
|
#==============================================
|
||||||
|
@ -34,9 +30,8 @@ ynh_nodejs_install
|
||||||
ynh_script_progression "Building CodiMD... (this will take some time and resources!)"
|
ynh_script_progression "Building CodiMD... (this will take some time and resources!)"
|
||||||
|
|
||||||
pushd "$install_dir"
|
pushd "$install_dir"
|
||||||
|
ynh_hide_warnings ynh_exec_as_app bin/setup
|
||||||
ynh_hide_warnings ynh_exec_as_app node_load_PATH bin/setup
|
ynh_hide_warnings ynh_exec_as_app npm run build
|
||||||
ynh_hide_warnings ynh_exec_as_app node_load_PATH npm run build
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -44,10 +39,8 @@ popd
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Upgrading systemd configuration..."
|
ynh_script_progression "Upgrading systemd configuration..."
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
|
||||||
ynh_config_add_nginx
|
ynh_config_add_nginx
|
||||||
|
|
||||||
# Create a dedicated systemd config
|
|
||||||
ynh_config_add_systemd
|
ynh_config_add_systemd
|
||||||
|
|
||||||
yunohost service add $app --description="Collaborative Markdown notes" --log="/var/log/$app/$app.log"
|
yunohost service add $app --description="Collaborative Markdown notes" --log="/var/log/$app/$app.log"
|
||||||
|
|
Loading…
Add table
Reference in a new issue