mirror of
https://github.com/YunoHost-Apps/monitorix_ynh.git
synced 2024-09-03 19:46:06 +02:00
Many small fix
This commit is contained in:
parent
38169d35fa
commit
90934700a4
8 changed files with 12 additions and 13 deletions
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
bash __INSTALL_DIR__/update_config_if_needed.sh
|
||||
bash __INSTALL_DIR__/update_config_if_needed.sh install
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
bash __INSTALL_DIR__/update_config_if_needed.sh
|
||||
bash __INSTALL_DIR__/update_config_if_needed.sh remove
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
bash __INSTALL_DIR__/update_config_if_needed.sh
|
||||
bash __INSTALL_DIR__/update_config_if_needed.sh upgrade
|
||||
|
|
|
@ -80,7 +80,7 @@ load_vars() {
|
|||
readonly net_gateway="$(ip --json route show default | jq -r '.[0].dev')"
|
||||
readonly net_interface_list="$(ip --json link show | jq -r '.[].ifname | select(. != "lo")' | interface_speed_map)"
|
||||
readonly net_max_speed="$(cat /sys/class/net/*/speed 2>/dev/null | sort | tail -n1 | sed 's|-1|1000|g')"
|
||||
readonly ssh_port="$((grep ssh_port /etc/yunohost/settings.yml || echo 22) | cut -d: -f2 | xargs)"
|
||||
readonly ssh_port="$((([ -e /etc/yunohost/settings.yml ] && grep ssh_port /etc/yunohost/settings.yml) || echo 22) | cut -d: -f2 | xargs)"
|
||||
readonly port_infos="$(python3 <<EOF
|
||||
import yaml, socket
|
||||
hard_coded_ports = ["25", "53", "80", "443", "587", "993"]
|
||||
|
@ -134,7 +134,7 @@ with open("/etc/yunohost/services.yml", "r") as f:
|
|||
EOF
|
||||
)"
|
||||
|
||||
if compgen -G /etc/php/*/fpm/pool.d; then
|
||||
if compgen -G /etc/php/*/fpm/pool.d/*; then
|
||||
# Note that 'pm.status_listen' option is only supported on php >= 8.0 so we ignore older pools
|
||||
readonly php_pools_infos="$(grep -E '^\[.*\]' \
|
||||
--exclude=/etc/php/*/fpm/pool.d/"$app"_status.conf \
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
source ../settings/scripts/_common.sh
|
||||
source ../settings/scripts/experimental_helper.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
load_vars
|
||||
|
||||
|
|
|
@ -41,12 +41,12 @@ for pool_dir_by_version in /etc/php/*; do
|
|||
fi
|
||||
done
|
||||
|
||||
if ynh_psql_user_exists --user="$db_user"; then
|
||||
ynh_psql_drop_user "$db_user"
|
||||
fi
|
||||
if ynh_mysql_user_exists --user="$db_user"; then
|
||||
if $mysql_installed && ynh_mysql_user_exists --user="$db_user"; then
|
||||
ynh_mysql_drop_user "$db_user"
|
||||
fi
|
||||
if $postgresql_installed && ynh_psql_user_exists --user="$db_user"; then
|
||||
ynh_psql_drop_user "$db_user"
|
||||
fi
|
||||
|
||||
_ynh_apt autoremove --purge monitorix
|
||||
ynh_safe_rm "$install_dir"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
source ../settings/scripts/_common.sh
|
||||
source ../settings/scripts/experimental_helper.sh
|
||||
source /usr/share/yunohost/helpers
|
||||
load_vars
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ set -eu
|
|||
app=__APP__
|
||||
YNH_APP_BASEDIR=/etc/yunohost/apps/"$app"
|
||||
YNH_HELPERS_VERSION=2.1
|
||||
YNH_APP_ACTION="$1"
|
||||
|
||||
pushd /etc/yunohost/apps/$app/conf
|
||||
source ../scripts/_common.sh
|
||||
|
@ -80,7 +81,7 @@ if "$status_dirty"; then
|
|||
if "$phpfpm_installed"; then
|
||||
config_php_fpm
|
||||
fi
|
||||
ynh_systemctl --service_name="$app" --action=restart --log_path='systemd' --line_match=' - Ok, ready.'
|
||||
ynh_systemctl --service_name=nginx --action=reload
|
||||
ynh_systemctl --service="$app" --action=restart --log_path=systemd --wait_until=' - Ok, ready.'
|
||||
ynh_systemctl --service=nginx --action=reload
|
||||
save_vars_current_value
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue