1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wekan_ynh.git synced 2024-09-03 20:36:09 +02:00

adding _common.sh from example_ynh

This commit is contained in:
yalh76 2019-02-05 21:08:32 +01:00
parent 1f7fa01735
commit 343fa03a05
6 changed files with 25 additions and 2 deletions

13
scripts/_common.sh Normal file
View file

@ -0,0 +1,13 @@
#!/bin/bash
# ============= FUTURE YUNOHOST HELPER =============
# Delete a file checksum from the app settings
#
# $app should be defined when calling this helper
#
# usage: ynh_remove_file_checksum file
# | arg: file - The file for which the checksum will be deleted
ynh_delete_file_checksum () {
local checksum_setting_name=checksum_${1//[\/ ]/_} # Replace all '/' and ' ' by '_'
ynh_app_setting_delete $app $checksum_setting_name
}

View file

@ -5,6 +5,8 @@
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================

View file

@ -1,9 +1,12 @@
#!/bin/bash #!/bin/bash
#================================================= #=================================================
# GENERIC START # GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
source _common.sh
source _future.sh source _future.sh
source ynh_systemd_action source ynh_systemd_action
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers

View file

@ -1,9 +1,12 @@
#!/bin/bash #!/bin/bash
#================================================= #=================================================
# GENERIC STARTING # GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
source _common.sh
source _future.sh source _future.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers

View file

@ -5,6 +5,8 @@
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
source ../settings/scripts/_common.sh
source ../settings/scripts/_future.sh source ../settings/scripts/_future.sh
source ../settings/scripts/ynh_systemd_action source ../settings/scripts/ynh_systemd_action
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers

View file

@ -6,7 +6,7 @@
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
source _future.sh source _common.sh
source ynh_systemd_action source ynh_systemd_action
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers