Bug 7216 - koha-restore does not correctly set home
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Sat, 12 Nov 2011 00:53:14 +0000 (19:53 -0500)
committerPaul Poulain <paul.poulain@biblibre.com>
Tue, 6 Dec 2011 16:01:56 +0000 (17:01 +0100)
Prior to this patch, the koha-restore Debian script did not set the home
directory properly for the system users it created, causing problems down the
line for koha-rebuild-zebra. This patch fixes that by specifying the home
directory.

http://bugs.koha-community.org/show_bug.cgi?id=7216
Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
debian/scripts/koha-restore

index 4999088..caf4c7d 100755 (executable)
@@ -54,7 +54,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.,