mirror of
https://github.com/YunoHost-Apps/yunomonitor_ynh.git
synced 2024-09-03 17:46:11 +02:00
Merge pull request #4 from YunoHost-Apps/fix-linter
fix some linter warnings
This commit is contained in:
commit
2789e60fa4
6 changed files with 14 additions and 14 deletions
|
@ -13,6 +13,6 @@
|
|||
setup_public=0
|
||||
upgrade=1
|
||||
backup_restore=1
|
||||
multi_instance=1
|
||||
multi_instance=0
|
||||
port_already_use=0
|
||||
change_url=0
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
"id": "yunomonitor",
|
||||
"packaging_format": 1,
|
||||
"description": {
|
||||
"en": "Home made tool to monitor automatically your servers."
|
||||
"en": "Home made tool to monitor automatically your servers",
|
||||
"fr": "Outil pour surveiller automatiquement vos serveurs"
|
||||
},
|
||||
"version": "1.1.0~ynh1",
|
||||
"url": "https://github.com/zamentur/yunomonitor",
|
||||
|
@ -14,9 +15,9 @@
|
|||
"url": "https://reflexlibre.net"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 3.6"
|
||||
"yunohost": ">= 4.2.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"multi_instance": false,
|
||||
"services": [
|
||||
"nginx"
|
||||
],
|
||||
|
|
|
@ -20,7 +20,7 @@ ynh_abort_if_errors
|
|||
#=================================================
|
||||
# LOAD SETTINGS
|
||||
#=================================================
|
||||
ynh_script_progression --message="Loading installation settings..." --time --weight=1
|
||||
ynh_print_info --message="Loading installation settings..."
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -28,20 +28,19 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
|
||||
#=================================================
|
||||
# STANDARD BACKUP STEPS
|
||||
# DECLARE DATA AND CONF FILES TO BACKUP
|
||||
#=================================================
|
||||
ynh_print_info --message="Declaring files to be backed up..."
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE APP MAIN DIR
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up the main app directory..." --time --weight=1
|
||||
|
||||
ynh_backup --src_path="$final_path"
|
||||
|
||||
#=================================================
|
||||
# BACKUP THE NGINX CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up nginx web server configuration..." --time --weight=1
|
||||
|
||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/000-$app.conf"
|
||||
|
||||
|
@ -50,7 +49,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/000-$app.conf"
|
|||
#=================================================
|
||||
# BACKUP SYSTEMD
|
||||
#=================================================
|
||||
ynh_script_progression --message="Backing up systemd configuration..." --time --weight=1
|
||||
|
||||
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
||||
|
||||
|
@ -64,4 +62,4 @@ ynh_backup --src_path="/etc/systemd/system/$app.timer"
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." --time --last
|
||||
ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)."
|
||||
|
|
|
@ -92,12 +92,14 @@ ynh_system_user_create --username=$app
|
|||
#=================================================
|
||||
# CONFIGURE SYSTEMD TIMER
|
||||
#=================================================
|
||||
|
||||
ynh_add_systemd_config
|
||||
cp ../conf/systemd.timer "/etc/systemd/system/$app.timer"
|
||||
ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="/etc/systemd/system/$app.timer"
|
||||
systemctl daemon-reload
|
||||
systemctl enable $app.timer
|
||||
systemctl enable $app.timer --quiet
|
||||
systemctl start $app.timer
|
||||
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -75,8 +75,8 @@ chmod u+x $final_path/yunomonitor.py
|
|||
ynh_script_progression --message="Activating systemd timer..." --weight=1
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl enable $app.service
|
||||
systemctl enable $app.timer
|
||||
systemctl enable $app.service --quiet
|
||||
systemctl enable $app.timer --quiet
|
||||
systemctl start $app.timer
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -115,7 +115,6 @@ ynh_backup_if_checksum_is_different --file="$final_path/conf/$app.yml"
|
|||
# Recalculate and store the checksum of the file for the next upgrade.
|
||||
ynh_store_file_checksum --file="$final_path/conf/$app.yml"
|
||||
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
Loading…
Reference in a new issue