mirror of
https://github.com/YunoHost-Apps/dont-code_ynh.git
synced 2024-09-03 18:26:34 +02:00
Try to run mongo during install
This commit is contained in:
parent
5042dbb349
commit
c52e2b5b4b
2 changed files with 14 additions and 7 deletions
|
@ -8,18 +8,18 @@
|
||||||
public_key="dummy public key"
|
public_key="dummy public key"
|
||||||
is_public=1
|
is_public=1
|
||||||
; Checks
|
; Checks
|
||||||
pkg_linter=1
|
pkg_linter=0
|
||||||
setup_sub_dir=1
|
setup_sub_dir=1
|
||||||
setup_root=1
|
setup_root=0
|
||||||
setup_nourl=0
|
setup_nourl=0
|
||||||
setup_private=0
|
setup_private=0
|
||||||
setup_public=1
|
setup_public=0
|
||||||
upgrade=1
|
upgrade=0
|
||||||
upgrade=0 from_commit=CommitHash
|
upgrade=0 from_commit=CommitHash
|
||||||
backup_restore=1
|
backup_restore=0
|
||||||
multi_instance=0
|
multi_instance=0
|
||||||
port_already_use=1 (8083)
|
port_already_use=0 (8083)
|
||||||
change_url=1
|
change_url=0
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=ger@shared.collin.best
|
Email=ger@shared.collin.best
|
||||||
Notification=Down
|
Notification=Down
|
||||||
|
|
|
@ -319,6 +319,13 @@ ynh_install_mongo() {
|
||||||
# Make sure MongoDB is started and enabled
|
# Make sure MongoDB is started and enabled
|
||||||
systemctl enable $mongodb_servicename --quiet
|
systemctl enable $mongodb_servicename --quiet
|
||||||
systemctl daemon-reload --quiet
|
systemctl daemon-reload --quiet
|
||||||
|
|
||||||
|
# Test mongod to see if it crashes
|
||||||
|
ynh_exec_err /usr/bin/mongod --config /etc/mongodb.conf
|
||||||
|
sleep 60
|
||||||
|
pkill mongod
|
||||||
|
ynh_exec_err cat /var/log/mongodb/mongod.conf
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="systemd" --length=100 --timeout=60
|
ynh_systemd_action --service_name=$mongodb_servicename --action=restart --line_match="aiting for connections" --log_path="systemd" --length=100 --timeout=60
|
||||||
|
|
||||||
# Integrate MongoDB service in YunoHost
|
# Integrate MongoDB service in YunoHost
|
||||||
|
|
Loading…
Add table
Reference in a new issue