mirror of
https://github.com/YunoHost-Apps/wekan_ynh.git
synced 2024-09-03 20:36:09 +02:00
cleaning
This commit is contained in:
parent
935d344270
commit
22bbb5ff27
5 changed files with 2 additions and 29 deletions
|
@ -17,7 +17,7 @@ admindoc = "https://github.com/wekan/wekan/wiki"
|
||||||
code = "https://github.com/wekan/wekan"
|
code = "https://github.com/wekan/wekan"
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
yunohost = ">= 11.2.18"
|
yunohost = ">= 11.2.29"
|
||||||
helpers_version = "2.1"
|
helpers_version = "2.1"
|
||||||
architectures = ["amd64"]
|
architectures = ["amd64"]
|
||||||
multi_instance = true
|
multi_instance = true
|
||||||
|
|
|
@ -17,11 +17,8 @@ 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 from app.src
|
|
||||||
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:$app "$install_dir"
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE A MONGODB DATABASE
|
# CREATE A MONGODB DATABASE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -39,10 +36,8 @@ ynh_mongo_setup_db --db_user=$db_user --db_name=$db_name
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Configuring NGINX web server..."
|
ynh_script_progression "Configuring NGINX web server..."
|
||||||
|
|
||||||
# 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="Wekan daemon" --log="/var/log/$app/$app.log"
|
yunohost service add $app --description="Wekan daemon" --log="/var/log/$app/$app.log"
|
||||||
|
@ -56,9 +51,6 @@ ynh_script_progression "Adding a config file..."
|
||||||
|
|
||||||
ynh_config_add --template=".env" --destination="$install_dir/.env"
|
ynh_config_add --template=".env" --destination="$install_dir/.env"
|
||||||
|
|
||||||
#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 400 "$install_dir/.env"
|
|
||||||
#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 | chown $app:$app "$install_dir/.env"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -9,24 +9,20 @@ source /usr/share/yunohost/helpers
|
||||||
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
|
||||||
if ynh_hide_warnings yunohost service status $app >/dev/null
|
if ynh_hide_warnings yunohost service status $app >/dev/null
|
||||||
then
|
then
|
||||||
ynh_script_progression "Removing $app service integration..."
|
ynh_script_progression "Removing $app service integration..."
|
||||||
yunohost service remove $app
|
yunohost service remove $app
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove the dedicated systemd config
|
|
||||||
ynh_config_remove_systemd
|
ynh_config_remove_systemd
|
||||||
|
|
||||||
# Remove a database if it exists, along with the associated user
|
# Remove a database if it exists, along with the associated user
|
||||||
ynh_mongo_remove_db --db_user=$db_user --db_name=$db_name
|
ynh_mongo_remove_db --db_user=$db_user --db_name=$db_name
|
||||||
ynh_remove_mongo
|
ynh_remove_mongo
|
||||||
|
|
||||||
# Remove the dedicated NGINX config
|
|
||||||
ynh_config_remove_nginx
|
ynh_config_remove_nginx
|
||||||
|
|
||||||
# Remove metapackage and its dependencies
|
|
||||||
ynh_nodejs_remove
|
ynh_nodejs_remove
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -10,8 +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:$app "$install_dir"
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC RESTORATION
|
# SPECIFIC RESTORATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -19,7 +17,6 @@ ynh_restore "$install_dir"
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Reinstalling dependencies..."
|
ynh_script_progression "Reinstalling dependencies..."
|
||||||
|
|
||||||
# Define and install dependencies
|
|
||||||
ynh_nodejs_install
|
ynh_nodejs_install
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -49,10 +46,6 @@ ynh_script_progression "Starting $app's systemd service..."
|
||||||
|
|
||||||
ynh_systemctl --service=$app --action="start" --log_path=systemd --wait_until="Enabling LDAP Background Sync"
|
ynh_systemctl --service=$app --action="start" --log_path=systemd --wait_until="Enabling LDAP Background Sync"
|
||||||
|
|
||||||
#if ynh_in_ci_tests; then
|
|
||||||
# sleep 60
|
|
||||||
#fi
|
|
||||||
|
|
||||||
ynh_systemctl --service=nginx --action=reload
|
ynh_systemctl --service=nginx --action=reload
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -31,11 +31,8 @@ ynh_safe_rm "/etc/apt/sources.list.d/mongodb-org-4.4.list"
|
||||||
#=================================================
|
#=================================================
|
||||||
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=".env"
|
||||||
ynh_setup_source --dest_dir="$install_dir" --keep=".env"
|
|
||||||
|
|
||||||
#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:$app "$install_dir"
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPGRADE DEPENDENCIES
|
# UPGRADE DEPENDENCIES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -50,10 +47,8 @@ ynh_install_mongo
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression "Upgrading NGINX web server configuration..."
|
ynh_script_progression "Upgrading NGINX web server 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="Wekan daemon" --log="/var/log/$app/$app.log"
|
yunohost service add $app --description="Wekan daemon" --log="/var/log/$app/$app.log"
|
||||||
|
@ -65,9 +60,6 @@ ynh_script_progression "Updating configuration..."
|
||||||
|
|
||||||
ynh_config_add --template=".env" --destination="$install_dir/.env"
|
ynh_config_add --template=".env" --destination="$install_dir/.env"
|
||||||
|
|
||||||
#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 400 "$install_dir/.env"
|
|
||||||
#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 | chown $app:$app "$install_dir/.env"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue