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:
parent
8f55519f2f
commit
3c938f69f7
5 changed files with 18 additions and 17 deletions
|
@ -7,7 +7,7 @@
|
|||
#=================================================
|
||||
|
||||
# Exit on command errors and treat unset variables as an error
|
||||
set -eu
|
||||
ynh_abort_if_errors
|
||||
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC STARTING
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
@ -10,7 +10,7 @@ source _common.sh
|
|||
source /usr/share/yunohost/helpers
|
||||
|
||||
#=================================================
|
||||
# MANAGE FAILURE OF THE SCRIPT
|
||||
# MANAGE SCRIPT FAILURE
|
||||
#=================================================
|
||||
|
||||
# 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
|
||||
|
||||
#=================================================
|
||||
# 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
|
||||
|
@ -63,7 +63,7 @@ yunohost firewall allow Both $peer_port >/dev/null 2>&1
|
|||
ynh_app_setting_set $app peer_port $peer_port
|
||||
|
||||
#=================================================
|
||||
# INSTALL TRANSMISSION
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
|
||||
ynh_install_app_dependencies transmission-daemon acl
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC STARTING
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
@ -83,7 +83,7 @@ ynh_secure_remove /usr/share/transmission
|
|||
ynh_secure_remove /var/lib/transmission-daemon
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# REMOVE DEDICATED USER
|
||||
#=================================================
|
||||
|
|
|
@ -1,13 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC STARTING
|
||||
#=================================================
|
||||
# MANAGE FAILURE OF THE SCRIPT
|
||||
#=================================================
|
||||
|
||||
# Exit on command errors and treat unset variables as an error
|
||||
set -eu
|
||||
# GENERIC START
|
||||
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
|
@ -21,6 +15,13 @@ fi
|
|||
source _common.sh
|
||||
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
|
||||
#=================================================
|
||||
|
@ -40,9 +41,9 @@ ynh_webpath_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"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
#=================================================
|
||||
# GENERIC STARTING
|
||||
# GENERIC START
|
||||
#=================================================
|
||||
# IMPORT GENERIC HELPERS
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue