|
Lines 36-61
Link Here
|
| 36 |
fi |
36 |
fi |
| 37 |
} |
37 |
} |
| 38 |
|
38 |
|
|
|
39 |
createlink() { |
| 40 |
local source="$1" |
| 41 |
local dest="$2" |
| 42 |
|
| 43 |
if [ ! -L $dest ] && [ ! -d $dest ] |
| 44 |
then |
| 45 |
ln -s "$source" "$dest" |
| 46 |
fi |
| 47 |
} |
| 48 |
|
| 39 |
for name in "$@" |
49 |
for name in "$@" |
| 40 |
do |
50 |
do |
| 41 |
rootdir "/var/spool/koha/$name" |
51 |
|
| 42 |
userdir "$name" "/etc/koha/sites/$name" |
52 |
KOHA_ROOT="/var/lib/koha/$name" |
| 43 |
userdir "$name" "/var/lib/koha/$name" |
53 |
userdir "$name" "$KOHA_ROOT" |
| 44 |
userdir "$name" "/var/lib/koha/$name/authorities" |
54 |
userdir "$name" "$KOHA_ROOT/var/lib/authorities" |
| 45 |
userdir "$name" "/var/lib/koha/$name/authorities/key" |
55 |
userdir "$name" "$KOHA_ROOT/var/lib/authorities/key" |
| 46 |
userdir "$name" "/var/lib/koha/$name/authorities/register" |
56 |
userdir "$name" "$KOHA_ROOT/var/lib/authorities/register" |
| 47 |
userdir "$name" "/var/lib/koha/$name/authorities/shadow" |
57 |
userdir "$name" "$KOHA_ROOT/var/lib/authorities/shadow" |
| 48 |
userdir "$name" "/var/lib/koha/$name/authorities/tmp" |
58 |
userdir "$name" "$KOHA_ROOT/var/lib/authorities/tmp" |
| 49 |
userdir "$name" "/var/lib/koha/$name/biblios" |
59 |
userdir "$name" "$KOHA_ROOT/var/lib/biblios" |
| 50 |
userdir "$name" "/var/lib/koha/$name/biblios/key" |
60 |
userdir "$name" "$KOHA_ROOT/var/lib/biblios/key" |
| 51 |
userdir "$name" "/var/lib/koha/$name/biblios/register" |
61 |
userdir "$name" "$KOHA_ROOT/var/lib/biblios/register" |
| 52 |
userdir "$name" "/var/lib/koha/$name/biblios/shadow" |
62 |
userdir "$name" "$KOHA_ROOT/var/lib/biblios/shadow" |
| 53 |
userdir "$name" "/var/lib/koha/$name/biblios/tmp" |
63 |
userdir "$name" "$KOHA_ROOT/var/lib/biblios/tmp" |
| 54 |
userdir "$name" "/var/lock/koha/$name" |
64 |
userdir "$name" "$KOHA_ROOT/var/lock" |
| 55 |
userdir "$name" "/var/lock/koha/$name/authorities" |
65 |
userdir "$name" "$KOHA_ROOT/var/lock/authorities" |
| 56 |
userdir "$name" "/var/lock/koha/$name/biblios" |
66 |
userdir "$name" "$KOHA_ROOT/var/lock/biblios" |
| 57 |
userdir "$name" "/var/run/koha/$name" |
67 |
userdir "$name" "$KOHA_ROOT/var/log" |
| 58 |
userdir "$name" "/var/run/koha/$name/authorities" |
68 |
userdir "$name" "$KOHA_ROOT/var/run" |
| 59 |
userdir "$name" "/var/run/koha/$name/biblios" |
69 |
userdir "$name" "$KOHA_ROOT/var/run/authorities" |
|
|
70 |
userdir "$name" "$KOHA_ROOT/var/run/biblios" |
| 71 |
rootdir "$KOHA_ROOT/var/spool" |
| 72 |
userdir "$name" "$KOHA_ROOT/etc" |
| 73 |
|
| 74 |
rootdir "/var/lock/koha" |
| 75 |
rootdir "/var/log/koha" |
| 76 |
rootdir "/var/run/koha" |
| 77 |
rootdir "/var/spool/koha" |
| 78 |
|
| 79 |
createlink "$KOHA_ROOT/var/spool" "/var/spool/koha/$name" |
| 80 |
createlink "$KOHA_ROOT/etc" "/etc/koha/sites/$name" |
| 81 |
createlink "$KOHA_ROOT/var/lib/authorities" "/var/lib/koha/$name/authorities" |
| 82 |
createlink "$KOHA_ROOT/var/lib/biblios" "/var/lib/koha/$name/biblios" |
| 83 |
createlink "$KOHA_ROOT/var/lock" "/var/lock/koha/$name" |
| 84 |
createlink "$KOHA_ROOT/var/log" "/var/log/koha/$name" |
| 85 |
createlink "$KOHA_ROOT/var/run" "/var/run/koha/$name" |
| 86 |
|
| 60 |
done |
87 |
done |
| 61 |
|
88 |
|