Browse Source

_common.sh

pull/19/head
Maniack Crudelis 9 years ago
parent
commit
11eeb9a401
  1. 7
      scripts/_common.sh
  2. 8
      scripts/backup
  3. 2
      scripts/install
  4. 2
      scripts/remove
  5. 8
      scripts/restore
  6. 2
      scripts/upgrade

7
scripts/.fonctions → scripts/_common.sh

@ -224,6 +224,13 @@ CHECK_MD5_CONFIG () { # Créé un backup du fichier de config si il a été modi
fi fi
} }
#=================================================
# PACKAGE CHECK BYPASSING...
#=================================================
IS_PACKAGE_CHECK () { # Détermine une exécution en conteneur (Non testé)
return uname -n | grep -c 'pchecker_lxc'
}
#================================================= #=================================================
#================================================= #=================================================

8
scripts/backup

@ -13,12 +13,12 @@ set -eu
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
if [ ! -e .fonctions ]; then
if [ ! -e _common.sh ]; then
# Rapatrie le fichier de fonctions si il n'est pas dans le dossier courant # Rapatrie le fichier de fonctions si il n'est pas dans le dossier courant
sudo cp ../settings/scripts/.fonctions ./.fonctions
sudo chmod a+rx .fonctions
sudo cp ../settings/scripts/_common.sh ./_common.sh
sudo chmod a+rx _common.sh
fi fi
source .fonctions
source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================

2
scripts/install

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

2
scripts/remove

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

8
scripts/restore

@ -13,12 +13,12 @@ set -eu
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
if [ ! -e .fonctions ]; then
if [ ! -e _common.sh ]; then
# Rapatrie le fichier de fonctions si il n'est pas dans le dossier courant # Rapatrie le fichier de fonctions si il n'est pas dans le dossier courant
sudo cp ../settings/scripts/.fonctions ./.fonctions
sudo chmod a+rx .fonctions
sudo cp ../settings/scripts/_common.sh ./_common.sh
sudo chmod a+rx _common.sh
fi fi
source .fonctions
source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================

2
scripts/upgrade

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

Loading…
Cancel
Save