mirror of
https://github.com/YunoHost-Apps/wekan_ynh.git
synced 2024-09-03 20:36:09 +02:00
commit
09ff820447
14 changed files with 106 additions and 160 deletions
|
@ -9,7 +9,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
|||
## Overview
|
||||
Wekan is an open-source kanban board (task manager and organizer)
|
||||
|
||||
**Shipped version:** 5.00
|
||||
**Shipped version:** 5.17
|
||||
|
||||
## Screenshots
|
||||
|
||||
|
|
|
@ -13,19 +13,21 @@
|
|||
setup_public=1
|
||||
upgrade=1
|
||||
# 3.79~ynh2
|
||||
upgrade=1 from_commit=2843d504bcdb0402939f87ebeeda3417de02a9e4
|
||||
#upgrade=1 from_commit=2843d504bcdb0402939f87ebeeda3417de02a9e4
|
||||
# 3.95~ynh1
|
||||
upgrade=1 from_commit=46f4b540cb99090a3fe1d35828094dbbfb34b692
|
||||
#upgrade=1 from_commit=46f4b540cb99090a3fe1d35828094dbbfb34b692
|
||||
# 3.95~ynh1
|
||||
upgrade=1 from_commit=3cd252289f4fd138879872658762f4c6ae415cc4
|
||||
#upgrade=1 from_commit=3cd252289f4fd138879872658762f4c6ae415cc4
|
||||
# 4.09~ynh1
|
||||
upgrade=1 from_commit=c2b4715e8591031f3054cedb1220e7619607bb36
|
||||
#upgrade=1 from_commit=c2b4715e8591031f3054cedb1220e7619607bb36
|
||||
# 4.43~ynh1
|
||||
upgrade=1 from_commit=2cf63bd4d660eae4526221c1a68efede499e3ee6
|
||||
#upgrade=1 from_commit=2cf63bd4d660eae4526221c1a68efede499e3ee6
|
||||
# 4.64~ynh1
|
||||
upgrade=1 from_commit=32fe3a7c342e5f29d7a7534125151723f916de46
|
||||
# 4.64~ynh2
|
||||
upgrade=1 from_commit=9e698d094c29fc6ab12ac60cd1d0e68b56bfc953
|
||||
# 5.00~ynh1
|
||||
upgrade=1 from_commit=8655e8062d1bc6e90b01b98ca9a0dea15d60119e
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
port_already_use=0
|
||||
|
@ -48,3 +50,5 @@ Notification=down
|
|||
name=4.64~ynh1
|
||||
; commit=9e698d094c29fc6ab12ac60cd1d0e68b56bfc953
|
||||
name=4.64~ynh2
|
||||
; commit=8655e8062d1bc6e90b01b98ca9a0dea15d60119e
|
||||
name=5.00~ynh1
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# This is on YunoHost server just to avoid the file from disappearing
|
||||
# Original source is https://releases.wekan.team/raspi3/wekan-5.00-arm64.zip
|
||||
# YunoHost source is https://build.yunohost.org/apps/wekan-5.00-arm64.zip
|
||||
SOURCE_URL=https://build.yunohost.org/apps/wekan-5.00-arm64.zip
|
||||
SOURCE_SUM=156b9578766d4f133c8078bec1433fe5147e7fc594f0fbb8bdb000df2a269c89
|
||||
# Original source is https://releases.wekan.team/raspi3/wekan-5.17-arm64.zip
|
||||
# YunoHost source is https://build.yunohost.org/apps/wekan-5.17-arm64.zip
|
||||
SOURCE_URL=https://build.yunohost.org/apps/wekan-5.17-arm64.zip
|
||||
SOURCE_SUM=3137fa9fb079e42f33405d77738bec7ceae00c3e332394b4a79524552eb4fb3e
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=wekan-5.00-arm64.zip
|
||||
SOURCE_FILENAME=wekan-5.17-arm64.zip
|
||||
|
|
|
@ -5,31 +5,16 @@ location __PATH__/ {
|
|||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
client_max_body_size 100M;
|
||||
|
||||
proxy_pass http://127.0.0.1:__PORT__;
|
||||
proxy_http_version 1.1;
|
||||
client_max_body_size 100M;
|
||||
proxy_set_header Accept-Encoding "";
|
||||
|
||||
# allow websockets
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
|
||||
# preserve client IP
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
#proxy_buffering off;
|
||||
|
||||
# this setting allows the browser to cache the application in
|
||||
# a way compatible with Meteor.
|
||||
# on every applicaiton update the name of CSS and JS file is different,
|
||||
# so they can be cache infinitely (here: 30 days)
|
||||
# the root path MUST NOT be cached
|
||||
if ($uri != '__PATH__')
|
||||
{
|
||||
expires 30d;
|
||||
}
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ Type=simple
|
|||
User=__APP__
|
||||
Group=__APP__
|
||||
EnvironmentFile=__FINALPATH__/.env
|
||||
WorkingDirectory=__FINALPATH__
|
||||
WorkingDirectory=__FINALPATH__/
|
||||
ExecStart=__YNH_NODE__ __FINALPATH__/main.js
|
||||
Restart=on-failure
|
||||
#StartLimitInterval=86400
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# This is on YunoHost server just to avoid the file from disappearing
|
||||
# Original source is https://releases.wekan.team/wekan-5.00.zip
|
||||
# YunoHost source is https://build.yunohost.org/apps/wekan-5.00.zip
|
||||
SOURCE_URL=https://build.yunohost.org/apps/wekan-5.00.zip
|
||||
SOURCE_SUM=815a6893185c4f063582afe13a63b78f3bfd5bd8bfe290ba002117657426b5cf
|
||||
# Original source is https://releases.wekan.team/wekan-5.17.zip
|
||||
# YunoHost source is https://build.yunohost.org/apps/wekan-5.17.zip
|
||||
SOURCE_URL=https://build.yunohost.org/apps/wekan-5.17.zip
|
||||
SOURCE_SUM=42b41c5c774cbc58ef64718040a5c0306ea8e42980c1e25636d16dab831f32c3
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=zip
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=wekan-5.00.zip
|
||||
SOURCE_FILENAME=wekan-5.17.zip
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Trello-like kanban",
|
||||
"fr": "Un kanban similaire à Trello"
|
||||
},
|
||||
"version": "5.00~ynh1",
|
||||
"version": "5.17~ynh1",
|
||||
"url": "https://wekan.io",
|
||||
"license": "MIT",
|
||||
"maintainer": [
|
||||
|
@ -17,7 +17,11 @@
|
|||
},
|
||||
{
|
||||
"name": "ljf"
|
||||
}],
|
||||
},
|
||||
{
|
||||
"name": "yalh76"
|
||||
}
|
||||
],
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.1.3"
|
||||
},
|
||||
|
@ -30,38 +34,22 @@
|
|||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"ask": {
|
||||
"en": "Choose a domain name for Wekan",
|
||||
"fr": "Choisissez un nom de domaine pour Wekan"
|
||||
},
|
||||
"example": "example.com"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
"type": "path",
|
||||
"ask": {
|
||||
"en": "Choose a path for Wekan",
|
||||
"fr": "Choisissez un chemin pour Wekan"
|
||||
},
|
||||
"example": "/wekan",
|
||||
"default": "/wekan"
|
||||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"type": "user",
|
||||
"ask": {
|
||||
"en": "Choose an admin user",
|
||||
"fr": "Choisissez l'administrateur"
|
||||
},
|
||||
"example": "johndoe"
|
||||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
"type": "boolean",
|
||||
"ask": {
|
||||
"en": "Is it a public application?",
|
||||
"fr": "Est-ce une application publique ?"
|
||||
},
|
||||
"default": false
|
||||
}
|
||||
]
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
# dependencies used by the app
|
||||
pkg_dependencies=""
|
||||
|
||||
nodejsversion=12.16.3
|
||||
NODEJS_VERSION=12.16.3
|
||||
|
||||
#=================================================
|
||||
# PERSONAL HELPERS
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||
# 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/ynh_mongo_db
|
||||
source /usr/share/yunohost/helpers
|
||||
|
|
|
@ -38,7 +38,7 @@ port=$(ynh_app_setting_get --app=$app --key=port)
|
|||
#=================================================
|
||||
# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the app before changing its url (may take a while)..."
|
||||
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..."
|
||||
|
||||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
|
@ -46,7 +46,7 @@ ynh_clean_setup () {
|
|||
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
|
||||
ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||
|
||||
# restore it if the upgrade fails
|
||||
# Restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
|
@ -80,23 +80,23 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path=systemd
|
|||
#=================================================
|
||||
# MODIFY URL IN NGINX CONF
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating nginx web server configuration..."
|
||||
ynh_script_progression --message="Updating NGINX web server configuration..."
|
||||
|
||||
nginx_conf_path=/etc/nginx/conf.d/$old_domain.d/$app.conf
|
||||
|
||||
# Change the path in the nginx config file
|
||||
# Change the path in the NGINX config file
|
||||
if [ $change_path -eq 1 ]
|
||||
then
|
||||
# Make a backup of the original nginx config file if modified
|
||||
# Make a backup of the original NGINX config file if modified
|
||||
ynh_backup_if_checksum_is_different --file="$nginx_conf_path"
|
||||
# Set global variables for nginx helper
|
||||
# Set global variables for NGINX helper
|
||||
domain="$old_domain"
|
||||
path_url="$new_path"
|
||||
# Create a dedicated nginx config
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
fi
|
||||
|
||||
# Change the domain for nginx
|
||||
# Change the domain for NGINX
|
||||
if [ $change_domain -eq 1 ]
|
||||
then
|
||||
# Delete file checksum for the old conf file location
|
||||
|
@ -134,7 +134,7 @@ fi
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..."
|
||||
ynh_script_progression --message="Reloading NGINX web server..."
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -75,16 +75,23 @@ ynh_app_setting_set --app=$app --key=port --value=$port
|
|||
ynh_script_progression --message="Installing dependencies..."
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
ynh_install_nodejs --nodejs_version=$nodejsversion
|
||||
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
||||
ynh_use_nodejs
|
||||
ynh_install_mongo
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring system user..."
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# CREATE A MONGODB DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Creating a MongoDB database..."
|
||||
|
||||
# Registering db name
|
||||
db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||
db_user=$db_name
|
||||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||
|
@ -99,22 +106,18 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
|||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R root:$app "$final_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring nginx web server..."
|
||||
ynh_script_progression --message="Configuring NGINX web server..."
|
||||
|
||||
# Create a dedicated nginx config
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Configuring system user..."
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
#=================================================
|
||||
|
@ -126,25 +129,17 @@ ynh_script_progression --message="Configuring a systemd service..."
|
|||
ynh_add_systemd_config --others_var="mongodb_servicename ynh_node"
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
# ADD A CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Modifying a config file..."
|
||||
ynh_script_progression --message="Adding a config file..."
|
||||
|
||||
# Create a dedicated .env config
|
||||
ynh_add_config --template=".env" --destination="$final_path/.env"
|
||||
|
||||
chmod 400 "$final_path/.env"
|
||||
chown $app:$app "$final_path/.env"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Securing files and directories..."
|
||||
|
||||
# Set strong right permissions to app files
|
||||
chown -R $app: "$final_path"
|
||||
chmod -R 640 "$final_path"
|
||||
find "$final_path" -type d -print0 | xargs -0 chmod 750
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
|
@ -169,8 +164,6 @@ fi
|
|||
#=================================================
|
||||
ynh_script_progression --message="Configuring permissions..."
|
||||
|
||||
ynh_permission_create --permission="admin" --allowed "$admin"
|
||||
|
||||
# Make app public if necessary
|
||||
if [ $is_public -eq 1 ]
|
||||
then
|
||||
|
@ -179,10 +172,12 @@ then
|
|||
ynh_permission_update --permission="main" --add="visitors"
|
||||
fi
|
||||
|
||||
ynh_permission_create --permission="admin" --allowed=$admin
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..."
|
||||
ynh_script_progression --message="Reloading NGINX web server..."
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|||
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
||||
#=================================================
|
||||
|
||||
# Remove the service from the list of services known by Yunohost (added from `yunohost service add`)
|
||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
||||
then
|
||||
ynh_script_progression --message="Removing $app service integration..."
|
||||
|
@ -73,9 +73,9 @@ ynh_secure_remove --file="$final_path"
|
|||
#=================================================
|
||||
# REMOVE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing nginx web server configuration..."
|
||||
ynh_script_progression --message="Removing NGINX web server configuration..."
|
||||
|
||||
# Remove the dedicated nginx config
|
||||
# Remove the dedicated NGINX config
|
||||
ynh_remove_nginx_config
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
||||
#Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
|
||||
# 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/ynh_mongo_db
|
||||
source /usr/share/yunohost/helpers
|
||||
|
@ -24,7 +24,7 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading settings..."
|
||||
ynh_script_progression --message="Loading installation settings..."
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -49,17 +49,10 @@ test ! -d $final_path \
|
|||
#=================================================
|
||||
# RESTORE THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring 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 APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the app main directory..."
|
||||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# RECREATE THE DEDICATED USER
|
||||
#=================================================
|
||||
|
@ -69,14 +62,15 @@ ynh_script_progression --message="Recreating the dedicated system user..."
|
|||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# RESTORE USER RIGHTS
|
||||
# RESTORE THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring user rights..."
|
||||
ynh_script_progression --message="Restoring the app main directory..."
|
||||
|
||||
# Restore permissions on app files
|
||||
chown -R $app: "$final_path"
|
||||
chmod -R 640 "$final_path"
|
||||
find "$final_path" -type d -print0 | xargs -0 chmod 750
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R root:$app "$final_path"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
|
@ -87,7 +81,7 @@ ynh_script_progression --message="Reinstalling dependencies..."
|
|||
|
||||
# Define and install dependencies
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
ynh_install_nodejs --nodejs_version=$nodejsversion
|
||||
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
||||
ynh_use_nodejs
|
||||
ynh_install_mongo
|
||||
|
||||
|
@ -131,7 +125,7 @@ fi
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..."
|
||||
ynh_script_progression --message="Reloading NGINX web server..."
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ fi
|
|||
|
||||
if ! ynh_permission_exists --permission="admin"; then
|
||||
# Create the required permissions
|
||||
ynh_permission_create --permission="admin" --allowed "$admin"
|
||||
ynh_permission_create --permission="admin" --allowed=$admin
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
@ -68,7 +68,7 @@ ynh_script_progression --message="Backing up the app before upgrading (may take
|
|||
# Backup the current version of the app
|
||||
ynh_backup_before_upgrade
|
||||
ynh_clean_setup () {
|
||||
# restore it if the upgrade fails
|
||||
# Restore it if the upgrade fails
|
||||
ynh_restore_upgradebackup
|
||||
}
|
||||
# Exit if an error occurs during the execution of the script
|
||||
|
@ -114,23 +114,13 @@ if ynh_version_gt "2.56~ynh1" "${previous_version}" ; then
|
|||
touch $config_file
|
||||
fi
|
||||
|
||||
# Create the permission "admin" only if it doesn't exist.
|
||||
if ! ynh_permission_exists --permission="admin"
|
||||
then
|
||||
ynh_script_progression --message="Upgrading Permission configuration..."
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..."
|
||||
|
||||
ynh_app_setting_delete --app=$app --key=unprotected_uris
|
||||
|
||||
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
|
||||
|
||||
if [ $is_public -eq 1 ]; then
|
||||
ynh_permission_update --permission "main" --add "visitors"
|
||||
fi
|
||||
|
||||
ynh_app_setting_delete --app=$app --key=is_public
|
||||
|
||||
ynh_permission_create --permission="admin"
|
||||
fi
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -160,12 +150,16 @@ then
|
|||
ynh_secure_remove --file="$tmpdir"
|
||||
fi
|
||||
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R root:$app "$final_path"
|
||||
|
||||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading nginx web server configuration..."
|
||||
ynh_script_progression --message="Upgrading NGINX web server configuration..."
|
||||
|
||||
# Create a dedicated nginx config
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
|
@ -175,26 +169,12 @@ ynh_script_progression --message="Upgrading dependencies..."
|
|||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
ynh_remove_nodejs
|
||||
ynh_install_nodejs --nodejs_version=$nodejsversion
|
||||
ynh_install_nodejs --nodejs_version=$NODEJS_VERSION
|
||||
ynh_use_nodejs
|
||||
ynh_install_mongo
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
ynh_script_progression --message="Making sure dedicated system user exists..."
|
||||
|
||||
# Create a dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app --home_dir="$final_path"
|
||||
|
||||
#=================================================
|
||||
# MODIFY A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Modifying a config file..."
|
||||
|
||||
# Create a dedicated .env config
|
||||
ynh_add_config --template=".env" --destination="$final_path/.env"
|
||||
|
||||
# SPECIFIC UPGRADE
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
#=================================================
|
||||
|
@ -203,18 +183,18 @@ ynh_script_progression --message="Upgrading systemd configuration..."
|
|||
# Create a dedicated systemd config
|
||||
ynh_add_systemd_config --others_var="mongodb_servicename ynh_node"
|
||||
|
||||
#=================================================
|
||||
# UPDATE A CONFIG FILE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Updating a config file..."
|
||||
|
||||
ynh_add_config --template=".env" --destination="$final_path/.env"
|
||||
|
||||
chmod 400 "$final_path/.env"
|
||||
chown $app:$app "$final_path/.env"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Securing files and directories..."
|
||||
|
||||
# Set permissions on app files
|
||||
chown -R $app: "$final_path"
|
||||
chmod -R 640 "$final_path"
|
||||
find "$final_path" -type d -print0 | xargs -0 chmod 750
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
|
@ -236,7 +216,7 @@ fi
|
|||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reloading nginx web server..."
|
||||
ynh_script_progression --message="Reloading NGINX web server..."
|
||||
|
||||
ynh_systemd_action --service_name=nginx --action=reload
|
||||
|
||||
|
|
Loading…
Reference in a new issue