1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wekan_ynh.git synced 2024-09-03 20:36:09 +02:00
This commit is contained in:
Éric Gaspar 2023-09-14 14:19:44 +02:00
parent ccc7fb5458
commit 8384717fae
6 changed files with 20 additions and 74 deletions

View file

@ -43,10 +43,10 @@ ram.runtime = "50M"
[resources]
[resources.sources.main]
arm64.url = "https://github.com/wekan/wekan/releases/download/v6.97/wekan-6.97-arm64.zip"
arm64.sha256 = "3c60fadf67cee852da3e453f32e9548b5ba4f9bd2bdba7e4f60a9f3c4998b08a"
amd64.url = "https://github.com/wekan/wekan/releases/download/v6.97/wekan-6.97-amd64.zip"
amd64.sha256 = "b2637a2a1545a35ac622651aa9d58b58f295ada66cfe9863602aafbfcac90dcc"
arm64.url = "https://github.com/wekan/wekan/releases/download/v7.09/wekan-7.09-arm64.zip"
arm64.sha256 = "0ef14b07dd7fdb635b0350094f3df57aeb6d082e4525fe087e097c4f8cfbf238"
amd64.url = "https://github.com/wekan/wekan/releases/download/v7.09/wekan-7.09-amd64.zip"
amd64.sha256 = "7f9956c878bab40c99d5a7bebdeb1a7fa7d0016098cd47f0946bfde7d997ae7d"
autoupdate.strategy = "latest_github_release"
autoupdate.asset.amd64 = "*-amd64.zip"
autoupdate.asset.arm64 = "*-arm64.zip"

View file

@ -16,7 +16,7 @@ mongo_version=6.0
#=================================================
readonly YNH_DEFAULT_MONGO_VERSION=4.4
# Declare the actual MongoDB version to use: 4.4 ; 5.0
# Declare the actual MongoDB version to use: 4.4; 5.0; 6.0
# A packager willing to use another version of MongoDB can override the variable into its _common.sh.
YNH_MONGO_VERSION=${YNH_MONGO_VERSION:-$YNH_DEFAULT_MONGO_VERSION}

View file

@ -47,6 +47,11 @@ ynh_script_progression --message="Configuring NGINX web server..."
# Create a dedicated NGINX config
ynh_add_nginx_config
# Create a dedicated systemd config
ynh_add_systemd_config
yunohost service add $app --description="Wekan daemon" --log="/var/log/$app/$app.log"
#=================================================
# SPECIFIC SETUP
#=================================================
@ -61,23 +66,6 @@ ynh_add_config --template=".env" --destination="$install_dir/.env"
chmod 400 "$install_dir/.env"
chown $app:$app "$install_dir/.env"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..."
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description="Wekan daemon"
#=================================================
# START SYSTEMD SERVICE
#=================================================

View file

@ -30,38 +30,18 @@ then
yunohost service remove $app
fi
#=================================================
# STOP AND REMOVE SERVICE
#=================================================
ynh_script_progression --message="Stopping and removing the systemd service..."
# Remove the dedicated systemd config
ynh_remove_systemd_config
#=================================================
# REMOVE THE MONGODB DATABASE
#=================================================
ynh_script_progression --message="Removing the MongoDB database..."
# Remove a database if it exists, along with the associated user
ynh_mongo_remove_db --db_user=$db_user --db_name=$db_name
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Removing NGINX web server configuration..."
ynh_remove_mongo
# Remove the dedicated NGINX config
ynh_remove_nginx_config
#=================================================
# REMOVE DEPENDENCIES
#=================================================
#REMOVEME? ynh_script_progression --message="Removing dependencies..."
# Remove metapackage and its dependencies
ynh_remove_nodejs
ynh_remove_mongo
#=================================================
# END OF SCRIPT

View file

@ -32,13 +32,6 @@ ynh_install_nodejs --nodejs_version=$nodejs_version
ynh_use_nodejs
ynh_install_mongo --mongo_version=$mongo_version
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE MONGODB DATABASE
#=================================================
@ -47,18 +40,15 @@ ynh_script_progression --message="Restoring the MongoDB database..."
ynh_mongo_restore_db --database="$db_name" < ./dump.bson
#=================================================
# RESTORE SYSTEMD
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the systemd configuration..."
ynh_script_progression --message="Restoring the NGINX web server configuration..."
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description="Wekan daemon"
#=================================================

View file

@ -70,6 +70,11 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..."
# Create a dedicated NGINX config
ynh_add_nginx_config
# Create a dedicated systemd config
ynh_add_systemd_config
yunohost service add $app --description="Wekan daemon" --log="/var/log/$app/$app.log"
#=================================================
# SPECIFIC UPGRADE
#=================================================
@ -84,23 +89,6 @@ ynh_add_config --template=".env" --destination="$install_dir/.env"
chmod 400 "$install_dir/.env"
chown $app:$app "$install_dir/.env"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..."
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..."
yunohost service add $app --description="Wekan daemon"
#=================================================
# START SYSTEMD SERVICE
#=================================================