1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/transmission_ynh.git synced 2024-09-04 01:46:12 +02:00

Fix package_linter errors

Made scripts closer to example_ynh, mostly by fixing comments and using
ynh_abort_if_errors helper which fixes package_linter errors
This commit is contained in:
Côme Chilliet 2018-06-17 21:57:04 +02:00
parent 8f55519f2f
commit 3c938f69f7
5 changed files with 18 additions and 17 deletions

View file

@ -7,7 +7,7 @@
#================================================= #=================================================
# Exit on command errors and treat unset variables as an error # Exit on command errors and treat unset variables as an error
set -eu ynh_abort_if_errors
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
#================================================= #=================================================
# GENERIC STARTING # GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
@ -10,7 +10,7 @@ source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================
# MANAGE FAILURE OF THE SCRIPT # MANAGE SCRIPT FAILURE
#================================================= #=================================================
# Exit if an error occurs during the execution of the script # Exit if an error occurs during the execution of the script
@ -26,7 +26,7 @@ path_url=$YNH_APP_ARG_PATH
app=$YNH_APP_INSTANCE_NAME app=$YNH_APP_INSTANCE_NAME
#================================================= #=================================================
# CHECK IF THE APP CAN BE INSTALLED WITH THIS ARGS # CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
#================================================= #=================================================
# Normalize the url path syntax # Normalize the url path syntax
@ -63,7 +63,7 @@ yunohost firewall allow Both $peer_port >/dev/null 2>&1
ynh_app_setting_set $app peer_port $peer_port ynh_app_setting_set $app peer_port $peer_port
#================================================= #=================================================
# INSTALL TRANSMISSION # INSTALL DEPENDENCIES
#================================================= #=================================================
ynh_install_app_dependencies transmission-daemon acl ynh_install_app_dependencies transmission-daemon acl

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
#================================================= #=================================================
# GENERIC STARTING # GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
@ -83,7 +83,7 @@ ynh_secure_remove /usr/share/transmission
ynh_secure_remove /var/lib/transmission-daemon ynh_secure_remove /var/lib/transmission-daemon
#================================================= #=================================================
# GENERIC FINALISATION # GENERIC FINALIZATION
#================================================= #=================================================
# REMOVE DEDICATED USER # REMOVE DEDICATED USER
#================================================= #=================================================

View file

@ -1,13 +1,7 @@
#!/bin/bash #!/bin/bash
#================================================= #=================================================
# GENERIC STARTING # GENERIC START
#=================================================
# MANAGE FAILURE OF THE SCRIPT
#=================================================
# Exit on command errors and treat unset variables as an error
set -eu
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
@ -21,6 +15,13 @@ fi
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#================================================= #=================================================
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
@ -40,9 +41,9 @@ ynh_webpath_available $domain $path_url \
|| ynh_die "Path not available: ${domain}${path_url}" || ynh_die "Path not available: ${domain}${path_url}"
#================================================= #=================================================
# STANDARD RESTORE STEPS # STANDARD RESTORATION STEPS
#================================================= #=================================================
# RESTORE OF THE NGINX CONFIGURATION # RESTORE THE NGINX CONFIGURATION
#================================================= #=================================================
ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file "/etc/nginx/conf.d/$domain.d/$app.conf"

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
#================================================= #=================================================
# GENERIC STARTING # GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================