X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=debian%2Fscripts%2Fkoha-restore;h=e8ec053ee07e6bedffdcadf5f0e773cb9de6d5a5;hb=7b1e8c59fe0edc2faab878c6bd9d45de9f720e81;hp=49990883ba40c0fea1dd2214c234bb4545dc5c9c;hpb=9435c6730d93a50a7b92e0fdde237aff024e15a9;p=koha-ffzg.git diff --git a/debian/scripts/koha-restore b/debian/scripts/koha-restore index 49990883ba..e8ec053ee0 100755 --- a/debian/scripts/koha-restore +++ b/debian/scripts/koha-restore @@ -19,12 +19,13 @@ set -e - -die() { - echo "$@" 1>&2 +# include helper functions +if [ -f "/usr/share/koha/bin/koha-functions.sh" ]; then + . "/usr/share/koha/bin/koha-functions.sh" +else + echo "Error: /usr/share/koha/bin/koha-functions.sh not present." 1>&2 exit 1 -} - +fi # Parse command line. [ "$#" = 2 ] || die "Usage: $0 sqldump configdump" @@ -54,7 +55,7 @@ name=$(tar tf "$configdump" | sed -n '/^etc\/koha\/sites\/\([^/]*\)\/$/s//\1/p') username="$name-koha" adduser --no-create-home --disabled-login --gecos "Koha instance $username" \ - --quiet "$username" + --home "/var/lib/koha/$name" --quiet "$username" # Create dirs. Some of them will be in the tarball, but not all, e.g.,