1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/duniter_ynh.git synced 2024-09-03 18:26:35 +02:00

[mod] Move Duniter configuration in _common.sh

In order to maintain these lines once
to avoir repetitive code
Improve progress message/comments
This commit is contained in:
Moul 2022-05-05 20:35:42 +02:00 committed by M5oul
parent 656e78028d
commit 229636f7fc
4 changed files with 14 additions and 12 deletions

View file

@ -10,6 +10,11 @@ pkg_dependencies="deb1 deb2 php$YNH_DEFAULT_PHP_VERSION-deb1 php$YNH_DEFAULT_PHP
#=================================================
# PERSONAL HELPERS
#=================================================
CONFIGURE_DUNITER() {
ynh_exec_as duniter duniter config --bma --ipv4 127.0.0.1 --port $port --remoteh $domain --remotep 443 --noupnp
ynh_exec_as duniter duniter config --ws2p-host 127.0.0.1 --ws2p-port 20901 --ws2p-remote-host $domain --ws2p-remote-port 443 --ws2p-remote-path "/ws2p" --ws2p-noupnp
}
#=================================================
# EXPERIMENTAL HELPERS

View file

@ -99,12 +99,11 @@ chmod -R o-rwx "$datadir"
chown -R $app:www-data "$datadir"
#=================================================
# ADD A CONFIG FILE
# CONFIGURE DUNITER
#=================================================
ynh_script_progression --message="Adding a configuration file…"
ynh_script_progression --message="Configure Duniter…"
ynh_exec_as duniter duniter config --bma --ipv4 127.0.0.1 --port $port --remoteh $domain --remotep 443 --noupnp
ynh_exec_as duniter duniter config --ws2p-host 127.0.0.1 --ws2p-port 20901 --ws2p-remote-host $domain --ws2p-remote-port 443 --ws2p-remote-path "/ws2p" --ws2p-noupnp
CONFIGURE_DUNITER
#=================================================
# SETUP SYSTEMD

View file

@ -76,12 +76,11 @@ ynh_setup_source --dest_dir=$tempdir --source_id=$architecture
ynh_exec_warn_less dpkg -i $tempdir/duniter-server-v1.8.*-linux-*.deb
#=================================================
# ADD A CONFIG FILE
# CONFIGURE DUNITER
#=================================================
ynh_script_progression --message="Adding a configuration file…"
ynh_script_progression --message="Configure Duniter…"
ynh_exec_as duniter duniter --home $datadir config --bma --ipv4 127.0.0.1 --port $port --remoteh $domain --remotep 443 --noupnp
ynh_exec_as duniter duniter --home $datadir config --ws2p-host 127.0.0.1 --ws2p-port 20901 --ws2p-remote-host $domain --ws2p-remote-port 443 --ws2p-remote-path "/ws2p" --ws2p-noupnp
CONFIGURE_DUNITER
#=================================================
# RESTORE SYSTEMD

View file

@ -109,12 +109,11 @@ if [[ ! -d "${datadir}" ]]; then
fi
#=================================================
# UPDATE A CONFIG FILE
# UPDATE DUNITER CONFIG FILE
#=================================================
ynh_script_progression --message="Updating a configuration file…"
ynh_script_progression --message="Configure Duniter…"
ynh_exec_as duniter duniter config --bma --ipv4 127.0.0.1 --port $port --remoteh $domain --remotep 443 --noupnp
ynh_exec_as duniter duniter config --ws2p-host 127.0.0.1 --ws2p-port 20901 --ws2p-remote-host $domain --ws2p-remote-port 443 --ws2p-remote-path "/ws2p" --ws2p-noupnp
CONFIGURE_DUNITER
#=================================================
# SETUP SYSTEMD