mirror of
https://github.com/YunoHost-Apps/wekan_ynh.git
synced 2024-09-03 20:36:09 +02:00
[fix] Mongodb fails starting on second install
This commit is contained in:
parent
45c6ec233a
commit
790578ceda
6 changed files with 17 additions and 10 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
*.swp
|
||||
*.swo
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
SOURCE_URL=https://github.com/wekan/wekan/releases/download/v0.45/wekan-0.45.tar.gz
|
||||
SOURCE_SUM=4245f6674e407ad40bc899788058887213d5daf8d7620e0ae0c07af22b7c82aa
|
||||
SOURCE_URL=https://github.com/wekan/wekan/releases/download/v0.54/wekan-0.54.tar.gz
|
||||
SOURCE_SUM=fc3be49f1f317182a838f4b0deb058c35226e9d4609af9ea2050b4b866b2d4b1
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
ARCH_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=wekan-0.45.tar.gz
|
||||
SOURCE_FILENAME=wekan-0.54.tar.gz
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
"name": "Wekan",
|
||||
"id": "wekan",
|
||||
"packaging_format": 1,
|
||||
"version": "0.45-2",
|
||||
"version": "0.54-2",
|
||||
"description": {
|
||||
"en": "Trello-like kanban",
|
||||
"fr": "Un kanban similaire à Trello"
|
||||
|
|
|
@ -51,8 +51,8 @@ ynh_app_setting_set $app port $port
|
|||
ynh_install_nodejs 4.8.4
|
||||
|
||||
# Install mongodb
|
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
|
||||
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" > /etc/apt/sources.list.d/mongodb-org-3.2.list
|
||||
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
|
||||
echo "deb http://repo.mongodb.org/apt/debian jessie/mongodb-org/testing main" > /etc/apt/sources.list.d/mongodb-org.list
|
||||
|
||||
ynh_install_app_dependencies "mongodb-org mongodb-org-server mongodb-org-shell mongodb-org-mongos mongodb-org-tools"
|
||||
|
||||
|
@ -89,8 +89,8 @@ npm install
|
|||
popd
|
||||
|
||||
# Start mogodb
|
||||
systemctl start mongod
|
||||
systemctl enable mongod
|
||||
systemctl restart mongod
|
||||
|
||||
#=================================================
|
||||
# SETUP SYSTEMD
|
||||
|
@ -99,7 +99,7 @@ systemctl enable mongod
|
|||
ynh_replace_string "__NODEJS__" "$nodejs_use_version" "../conf/systemd.service"
|
||||
ynh_replace_string "__ENV_PATH__" "$PATH" "../conf/systemd.service"
|
||||
ynh_replace_string "__DB_NAME__" "$app" "../conf/systemd.service"
|
||||
ynh_replace_string "__URI__" "$path_url" "../conf/systemd.service"
|
||||
ynh_replace_string "__URI__" "$path_url/" "../conf/systemd.service"
|
||||
ynh_replace_string "__PORT__" "$port" "../conf/systemd.service"
|
||||
ynh_replace_string "__DOMAIN__" "$domain" "../conf/systemd.service"
|
||||
ynh_add_systemd_config
|
||||
|
@ -135,4 +135,4 @@ fi
|
|||
# RELOAD NGINX
|
||||
#=================================================
|
||||
systemctl reload nginx
|
||||
systemctl start $app
|
||||
systemctl restart $app
|
||||
|
|
|
@ -64,8 +64,8 @@ ynh_install_app_dependencies "mongodb-org mongodb-org-server mongodb-org-shell m
|
|||
# RESTORE DB
|
||||
#=================================================
|
||||
# Start mogodb
|
||||
systemctl start mongod
|
||||
systemctl enable mongod
|
||||
systemctl start mongod
|
||||
mongorestore --db $app ./dump
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -47,6 +47,10 @@ fi
|
|||
if ynh_version_gt "0.45-3" "${version}" ; then
|
||||
yunohost service add wekan
|
||||
fi
|
||||
if ynh_version_gt "0.54-2" "${version}" ; then
|
||||
systemctl enable mongod
|
||||
systemctl restart mongod
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# STANDARD UPGRADE STEPS
|
||||
|
|
Loading…
Reference in a new issue