mirror of
https://github.com/YunoHost-Apps/netdata_ynh.git
synced 2024-09-03 19:46:33 +02:00
Merge pull request #53 from YunoHost-Apps/Fix-linter-warnings
This commit is contained in:
commit
1e387b63d1
7 changed files with 12 additions and 36 deletions
|
@ -2,7 +2,7 @@ NetData for YunoHost
|
|||
---------------------
|
||||
|
||||
[](https://ci-apps.yunohost.org/jenkins/job/netdata%20%28Community%29/lastBuild/consoleFull)  
|
||||
[](https://install-app.yunohost.org/?app=netdata)
|
||||
[](https://install-app.yunohost.org/?app=netdata)
|
||||
|
||||
[NetData](http://my-netdata.io/) is a system for **distributed real-time performance and health monitoring**.
|
||||
It provides **unparalleled insights, in real-time**, of everything happening on the
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
wrong_user=0
|
||||
wrong_path=1
|
||||
change_url=1
|
||||
;;; Levels
|
||||
Level 5=auto
|
||||
# https://github.com/YunoHost-Apps/netdata_ynh/issues/4
|
||||
;;; Options
|
||||
Email=
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"url": ""
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 3.7.0"
|
||||
"yunohost": ">= 3.8.1"
|
||||
},
|
||||
"multi_instance": false,
|
||||
"services": [
|
||||
|
|
|
@ -34,46 +34,20 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
|
|||
#=================================================
|
||||
# STANDARD BACKUP STEPS
|
||||
#=================================================
|
||||
|
||||
ynh_print_info --message="Declaring files to be backed up..."
|
||||
|
||||
# N.B.: the following 'ynh_backup' calls are only a *declaration* of what needs
|
||||
# to be backuped and not an actual copy of any file. The actual backup that
|
||||
# creates and fill the archive with the files happens in the core after this
|
||||
# script is called. Hence ynh_backups calls takes basically 0 seconds to run
|
||||
|
||||
#=================================================
|
||||
# STOP SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_print_info --message="Stopping a systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="$final_path/var/log/$app/error.log"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_print_info --message="Backing up Netdata configuration directory..."
|
||||
|
||||
ynh_backup --src_path="$final_path/etc/netdata"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_print_info --message="Backing up nginx web server configuration..."
|
||||
|
||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC BACKUP
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
ynh_print_info --message="Starting a systemd service..."
|
||||
|
||||
ynh_systemd_action --service_name=$app --action="start" --log_path="$final_path/var/log/$app/error.log"
|
||||
|
||||
#=================================================
|
||||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
|
|
@ -118,7 +118,7 @@ configure_netdata
|
|||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
|
||||
yunohost service add $app --description "Real-time performance and health monitoring for systems and applications" --log "$final_path/var/log/netdata/error.log" "$final_path/var/log/netdata/access.log" "$final_path/var/log/netdata/debug.log"
|
||||
yunohost service add $app --description="Real-time performance and health monitoring for systems and applications" --log="$final_path/var/log/netdata/error.log" "$final_path/var/log/netdata/access.log" "$final_path/var/log/netdata/debug.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
@ -128,7 +128,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2
|
|||
# Start a systemd service
|
||||
ynh_systemd_action --service_name=$app --action="restart" --log_path="$final_path/var/log/$app/error.log"
|
||||
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
@ -144,7 +143,6 @@ fi
|
|||
# Add direct access in the portal to admin only
|
||||
ynh_permission_update --permission "main" --add "$admin"
|
||||
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
|
|
|
@ -71,7 +71,7 @@ ynh_install_app_dependencies $pkg_dependencies
|
|||
# INSTALL AND RESTORE THE APP CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Reinstalling Netdata..." --weight=30
|
||||
ynh_script_progression --message="Reinstalling Netdata..." --weight=18
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
NETDATA_TMPDIR=$(mktemp -d)
|
||||
|
@ -87,7 +87,7 @@ configure_netdata
|
|||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
|
||||
yunohost service add $app --description "Real-time performance and health monitoring for systems and applications" --log "$final_path/var/log/netdata/error.log" "$final_path/var/log/netdata/access.log" "$final_path/var/log/netdata/debug.log"
|
||||
yunohost service add $app --description="Real-time performance and health monitoring for systems and applications" --log="$final_path/var/log/netdata/error.log" "$final_path/var/log/netdata/access.log" "$final_path/var/log/netdata/debug.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
|
|
|
@ -79,7 +79,7 @@ ynh_abort_if_errors
|
|||
|
||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=180
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=18
|
||||
|
||||
#=================================================
|
||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||
|
@ -152,6 +152,12 @@ if [[ $is_public -eq 1 ]]; then
|
|||
ynh_permission_update --permission "main" --add "visitors"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
|
||||
yunohost service add $app --description="Real-time performance and health monitoring for systems and applications" --log="$final_path/var/log/netdata/error.log" "$final_path/var/log/netdata/access.log" "$final_path/var/log/netdata/debug.log"
|
||||
|
||||
#=================================================
|
||||
# START SYSTEMD SERVICE
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue