From 42d33ffc60fc11f93da5c514bce5acf707097fdd Mon Sep 17 00:00:00 2001 From: Moul Date: Wed, 15 Jun 2016 21:39:38 +0000 Subject: [PATCH] [enh] source helpers. --- scripts/backup | 3 +++ scripts/install | 3 +++ scripts/remove | 3 +++ scripts/restore | 3 +++ scripts/upgrade | 3 +++ 5 files changed, 15 insertions(+) diff --git a/scripts/backup b/scripts/backup index 1cb10c7..0a984d6 100644 --- a/scripts/backup +++ b/scripts/backup @@ -7,6 +7,9 @@ app=pluxml app_path=/var/www/$app save_path=$1 +# Source YunoHost helpers +source /usr/share/yunohost/helpers + sudo mkdir -p $save_path sudo cp -R $app_path/data $save_path/ sudo cp $app_path/config.php $save_path/ diff --git a/scripts/install b/scripts/install index cc5e0ec..d7c1a50 100644 --- a/scripts/install +++ b/scripts/install @@ -13,6 +13,9 @@ password=$4 is_public=$5 default_lang=$6 +# Source YunoHost helpers +source /usr/share/yunohost/helpers + # Remove trailing slash [ "$path" != "/" ] && path=${path%/} diff --git a/scripts/remove b/scripts/remove index f612c80..fd7318f 100644 --- a/scripts/remove +++ b/scripts/remove @@ -3,6 +3,9 @@ app=pluxml domain=$(sudo yunohost app setting $app domain) +# Source YunoHost helpers +source /usr/share/yunohost/helpers + # Remove sources sudo rm -rf /var/www/$app diff --git a/scripts/restore b/scripts/restore index 23d9a2a..eb50a1f 100644 --- a/scripts/restore +++ b/scripts/restore @@ -7,6 +7,9 @@ app=pluxml app_path=/var/www/$app save_path=$1 +# Source YunoHost helpers +source /usr/share/yunohost/helpers + sudo cp $save_path/config.php $app_path/ sudo rm -rf $app_path/data sudo cp -R $save_path/data $app_path/ diff --git a/scripts/upgrade b/scripts/upgrade index b52f231..6ff4765 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -11,6 +11,9 @@ path=$(sudo yunohost app setting $app path) admin=$(sudo yunohost app setting $app admin) is_public=$(sudo yunohost app setting $app is_public) +# Source YunoHost helpers +source /usr/share/yunohost/helpers + # Remove trailing "/" for next commands path=${path%/}