28
28
MOUNT_PATH=$mountpoint
31
# We wants several directory to be hosted on a shared fs:
33
# /var/www/spip/plugins
34
# /var/www/spip/squelettes
36
for i in plugins squelettes IMG ; do
37
if [ ! -d /var/www/spip/$i ]; then
38
mkdir /var/www/spip/$i ;
40
chown -R www-data /var/www/spip/$i ;
31
43
#Let s make a backup copy of things:
34
mv /var/www/spip/IMG/* /tmp/$d
46
for i in plugins squelettes IMG ; do
48
mv /var/www/spip/$i /tmp/$d/ ;
35
51
#Now we mount the nfs share.
36
juju-log "mount -t nfs $host:$mountpoint /var/www/spip/IMG/"
37
mount -t nfs $host:$mountpoint /var/www/spip/IMG/
52
mkdir -p /mnt/spip-nfs
54
juju-log "mount -t nfs $host:$mountpoint /mnt/spip-nfs"
55
mount -t nfs $host:$mountpoint /mnt/spip-nfs
57
for i in plugins squelettes IMG ; do
58
mv /tmp/$d/$i /mnt/spip-nfs/;
59
chown -R www-data /mnt/spip-nfs;
60
ln -s /mnt/spip-nfs/$i/ /var/www/spip/;
38
64
#We copy back all the stuff that was present locally.
39
mv /tmp/$d/* /var/www/spip/IMG/
65
#mv /tmp/$d/* /var/www/spip/IMG/
40
66
#and we chmod it back to www-data
41
chown -R www-data /var/www/spip/IMG/
b'\\ No newline at end of file'
67
#chown -R www-data /var/www/spip/IMG/
b'\\ No newline at end of file'