mirror of
https://github.com/YunoHost-Apps/wekan_ynh.git
synced 2024-09-03 20:36:09 +02:00
commit
1ed17a307b
10 changed files with 23 additions and 45 deletions
|
@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
WeKan ® is an completely Open Source and Free software collaborative kanban board application with MIT license.
|
WeKan ® is an completely Open Source and Free software collaborative kanban board application with MIT license.
|
||||||
|
|
||||||
|
|
||||||
**Shipped version:** 6.27.1~ynh1
|
**Shipped version:** 6.27.1~ynh2
|
||||||
|
|
||||||
**Demo:** https://demo.sandstorm.io/appdemo/m86q05rdvj14yvn78ghaxynqz7u2svw6rnttptxx49g1785cdv1h
|
**Demo:** https://demo.sandstorm.io/appdemo/m86q05rdvj14yvn78ghaxynqz7u2svw6rnttptxx49g1785cdv1h
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
WeKan ® is an completely Open Source and Free software collaborative kanban board application with MIT license.
|
WeKan ® is an completely Open Source and Free software collaborative kanban board application with MIT license.
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 6.27.1~ynh1
|
**Version incluse :** 6.27.1~ynh2
|
||||||
|
|
||||||
**Démo :** https://demo.sandstorm.io/appdemo/m86q05rdvj14yvn78ghaxynqz7u2svw6rnttptxx49g1785cdv1h
|
**Démo :** https://demo.sandstorm.io/appdemo/m86q05rdvj14yvn78ghaxynqz7u2svw6rnttptxx49g1785cdv1h
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,8 @@
|
||||||
upgrade=1 from_commit=2e9c8be6b87d5c4cd6693e7b3c0c05cfc7d1ac51
|
upgrade=1 from_commit=2e9c8be6b87d5c4cd6693e7b3c0c05cfc7d1ac51
|
||||||
# 5.93~ynh1
|
# 5.93~ynh1
|
||||||
upgrade=1 from_commit=493a70f7d0e79b3ee92d53976a0cd35fa944b428
|
upgrade=1 from_commit=493a70f7d0e79b3ee92d53976a0cd35fa944b428
|
||||||
|
# 6.27~ynh1
|
||||||
|
upgrade=1 from_commit=b74bbb4b5c8e67753672ecb69501c4a41771d852
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
port_already_use=0
|
port_already_use=0
|
||||||
|
@ -23,8 +25,3 @@
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=ljf+ynh-wekan@reflexlibre.net
|
Email=ljf+ynh-wekan@reflexlibre.net
|
||||||
Notification=down
|
Notification=down
|
||||||
;;; Upgrade options
|
|
||||||
; commit=2e9c8be6b87d5c4cd6693e7b3c0c05cfc7d1ac51
|
|
||||||
name=5.35~ynh1
|
|
||||||
; commit=493a70f7d0e79b3ee92d53976a0cd35fa944b428
|
|
||||||
name=5.93~ynh1
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
"en": "Trello-like kanban",
|
"en": "Trello-like kanban",
|
||||||
"fr": "Un kanban similaire à Trello"
|
"fr": "Un kanban similaire à Trello"
|
||||||
},
|
},
|
||||||
"version": "6.27.1~ynh1",
|
"version": "6.27.1~ynh2",
|
||||||
"url": "https://wekan.github.io",
|
"url": "https://wekan.github.io",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
# 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/_common.sh
|
||||||
source ../settings/scripts/ynh_mongo_db
|
source ../settings/scripts/ynh_mongo_db__2
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source ynh_mongo_db
|
source ynh_mongo_db__2
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source ynh_mongo_db
|
source ynh_mongo_db__2
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
# 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/_common.sh
|
||||||
source ../settings/scripts/ynh_mongo_db
|
source ../settings/scripts/ynh_mongo_db__2
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source ynh_mongo_db
|
source ynh_mongo_db__2
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
MONGO_DEBIAN_SERVICENAME="mongodb"
|
|
||||||
MONGO_CE_SERVICENAME="mongod"
|
MONGO_CE_SERVICENAME="mongod"
|
||||||
MONGO_DEBIAN_DEPENDENCIES="mongodb mongodb-server mongo-tools"
|
MONGO_CE_DEPENDENCIES="mongodb-org mongodb-org-server mongodb-org-tools mongodb-mongosh"
|
||||||
MONGO_CE_DEPENDENCIES="mongodb-org mongodb-org-server mongodb-org-tools"
|
|
||||||
MONGO_DEBIAN_CONFIG="/etc/mongodb.conf"
|
|
||||||
MONGO_CE_CONFIG="/etc/mongod.conf"
|
MONGO_CE_CONFIG="/etc/mongod.conf"
|
||||||
MONGO_CE_REPO="deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main"
|
MONGO_CE_REPO="deb http://repo.mongodb.org/apt/debian buster/mongodb-org/5.0 main"
|
||||||
MONGO_CE_KEY="https://www.mongodb.org/static/pgp/server-4.4.asc"
|
MONGO_CE_KEY="https://www.mongodb.org/static/pgp/server-5.0.asc"
|
||||||
|
|
||||||
# Execute a mongo command
|
# Execute a mongo command
|
||||||
#
|
#
|
||||||
|
@ -93,7 +90,7 @@ ynh_mongo_exec() {
|
||||||
database=""
|
database=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mongo --quiet $user $password $authenticationdatabase $host $port <<EOF
|
mongosh --quiet --username $user --password $password --authenticationDatabase $authenticationdatabase --host $host --port $port <<EOF
|
||||||
$database
|
$database
|
||||||
${command}
|
${command}
|
||||||
quit()
|
quit()
|
||||||
|
@ -107,7 +104,7 @@ EOF
|
||||||
database=""
|
database=""
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mongo --quiet $database $user $password $authenticationdatabase $host $port --eval="$command"
|
mongosh --quiet $database --username $user --password $password --authenticationDatabase $authenticationdatabase --host $host --port $port --eval="$command"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -307,27 +304,16 @@ ynh_mongo_remove_db() {
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
ynh_install_mongo() {
|
ynh_install_mongo() {
|
||||||
ynh_print_info --message="Installing MongoDB..."
|
ynh_print_info --message="Installing MongoDB Community Edition..."
|
||||||
|
ynh_install_extra_app_dependencies --repo="$MONGO_CE_REPO" --package="$MONGO_CE_DEPENDENCIES" --key="$MONGO_CE_KEY"
|
||||||
# Define Mongo Service Name
|
mongodb_servicename=$MONGO_CE_SERVICENAME
|
||||||
if dpkg --compare-versions $(cat /etc/debian_version) ge 10.0
|
|
||||||
then
|
|
||||||
ynh_print_info --message="Installing MongoDB Community Edition..."
|
|
||||||
ynh_install_extra_app_dependencies --repo="$MONGO_CE_REPO" --package="$MONGO_CE_DEPENDENCIES" --key="$MONGO_CE_KEY"
|
|
||||||
MONGODB_SERVICENAME=$MONGO_CE_SERVICENAME
|
|
||||||
else
|
|
||||||
ynh_print_info --message="Installing MongoDB Debian..."
|
|
||||||
ynh_install_app_dependencies $MONGO_DEBIAN_DEPENDENCIES
|
|
||||||
MONGODB_SERVICENAME=$MONGO_DEBIAN_SERVICENAME
|
|
||||||
fi
|
|
||||||
mongodb_servicename=$MONGODB_SERVICENAME
|
|
||||||
|
|
||||||
# Make sure MongoDB is started and enabled
|
# Make sure MongoDB is started and enabled
|
||||||
systemctl is-enabled $MONGODB_SERVICENAME -q || systemctl enable $MONGODB_SERVICENAME --quiet
|
systemctl is-enabled $mongodb_servicename -q || systemctl enable $mongodb_servicename --quiet
|
||||||
systemctl is-active $MONGODB_SERVICENAME -q || ynh_systemd_action --service_name=$MONGODB_SERVICENAME --action=restart --line_match="aiting for connections" --log_path="/var/log/mongodb/$MONGODB_SERVICENAME.log"
|
systemctl is-active $mongodb_servicename -q || ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="/var/log/mongodb/$mongodb_servicename.log"
|
||||||
|
|
||||||
# Integrate MongoDB service in YunoHost
|
# Integrate MongoDB service in YunoHost
|
||||||
yunohost service add $MONGODB_SERVICENAME --description="MongoDB daemon" --log="/var/log/mongodb/$MONGODB_SERVICENAME.log"
|
yunohost service add $mongodb_servicename --description="MongoDB daemon" --log="/var/log/mongodb/$mongodb_servicename.log"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Remove MongoDB
|
# Remove MongoDB
|
||||||
|
@ -342,14 +328,9 @@ ynh_remove_mongo() {
|
||||||
if ! ynh_package_is_installed --package="mongodb*"
|
if ! ynh_package_is_installed --package="mongodb*"
|
||||||
then
|
then
|
||||||
ynh_print_info --message="Removing MongoDB service..."
|
ynh_print_info --message="Removing MongoDB service..."
|
||||||
# Define Mongo Service Name
|
mongodb_servicename=$MONGO_CE_SERVICENAME
|
||||||
if [ "$(lsb_release --codename --short)" = "buster" ]; then
|
|
||||||
MONGODB_SERVICENAME=$MONGO_CE_SERVICENAME
|
|
||||||
else
|
|
||||||
MONGODB_SERVICENAME=$MONGO_DEBIAN_SERVICENAME
|
|
||||||
fi
|
|
||||||
# Remove the mongodb service
|
# Remove the mongodb service
|
||||||
yunohost service remove $MONGODB_SERVICENAME
|
yunohost service remove $mongodb_servicename
|
||||||
# ynh_secure_remove --file=$MONGO_ROOT_PWD_FILE
|
# ynh_secure_remove --file=$MONGO_ROOT_PWD_FILE
|
||||||
fi
|
fi
|
||||||
}
|
}
|
Loading…
Reference in a new issue