mirror of
https://gitlab.com/t6353/sharee.bike.git
synced 2024-11-14 06:36:27 +01:00
69 lines
2.8 KiB
Bash
Executable file
69 lines
2.8 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
#
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
# Copyright (c) Rainer Gümpelein, TeilRad GmbH
|
|
|
|
echo "YOur working directory:";
|
|
pwd
|
|
echo ""
|
|
|
|
chgrp -R www-data *
|
|
chmod go-w *
|
|
chmod -R o-rwx *
|
|
for i in $(find . -type d -and -name csv); do chmod -R ug+rwx $i;done
|
|
for i in $(find . -type d -and -name data); do chmod -R ug+rwx $i;done
|
|
for i in $(find . -type d -and -name ftp); do chmod -R ug+rwx $i;done
|
|
for i in $(find . -type d -and -name cache); do chmod -R ug+rwx $i;done
|
|
for i in $(find . -type d -and -name pdf); do chmod -R ug+rwx $i;done
|
|
for i in $(find . -type d -and -name xml); do chmod -R ug+rwx $i;done
|
|
for i in $(find . -type d -and -name site); do chmod -R ug+rwx $i;done
|
|
for i in $(find . -type d -and -name shareeconf); do chmod -R go-rwx $i;done
|
|
for i in $(find . -type d -and -name shareeconf); do chmod -R ug+rx $i;done
|
|
for i in $(find . -type d -and -name sql); do chmod -R go-rwx $i;done
|
|
for i in $(find . -type d -and -name src); do chmod -R go-w $i;done
|
|
for i in $(find . -type d -and -name src); do chmod -R ug+x $i;done
|
|
for i in $(find . -type d -and -name img); do chmod -R go-w $i;done
|
|
for i in $(find . -type d -and -name apache); do chmod -R go-w $i;done
|
|
for i in $(find . -type d -and -name css); do chmod -R go-w $i;done
|
|
for i in $(find . -type d -and -name js); do chmod -R go-w $i;done
|
|
for i in $(find . -type f -and -iname README*); do chmod -R go-rwx $i;done
|
|
for i in $(find . -type d -and -name docs); do chmod -R go-rwx $i;done
|
|
for i in $(find . -type f -and -name startup.pl); do chmod -R go-w $i;done
|
|
for i in $(find . -type f -and -name robots.txt); do chmod -R go-wx $i;done
|
|
for i in $(find . -type d -and -name cronjobs); do chmod -R g-w $i/*;done
|
|
for i in $(find . -type d -and -name cronjobs); do chmod -R o+r $i/*;done
|
|
for i in $(find . -type d -and -name cronjobs); do chown -R root:root $i/*;done
|
|
|
|
#do it only once on migration
|
|
if [ 1 == 2 ]
|
|
then
|
|
|
|
#delete jquery and bootstrap links
|
|
for i in $(find . -type l -and -name 'jquery*'); do rm $i;done
|
|
for i in $(find . -type l -and -name 'bootstrap*'); do rm $i;done
|
|
|
|
mkdir -p /var/www/external
|
|
mv /etc/shareeconf/bootstrap-5.1.3-dist /var/www/external/.
|
|
mv /etc/shareeconf/bootstrap-5.0.2-dist /var/www/external/.
|
|
mv /etc/shareeconf/bootstrap-icons-1.8.1 /var/www/external/.
|
|
mv /etc/shareeconf/jquery-3.3.1.min.js /var/www/external/.
|
|
mv /etc/shareeconf/jquery-ui-1.12.1 /var/www/external/.
|
|
|
|
#make new links for external bibliothecs
|
|
ln -s main/external /var/www/external
|
|
|
|
|
|
#linking operators to main/external
|
|
for i in $(find . -type d -and -name 'shareedms-*')
|
|
do ln -s ../main/external $i/external
|
|
done
|
|
for i in $(find . -type d -and -name 'shareeapp-*')
|
|
do ln -s ../main/external $i/external
|
|
done
|
|
for i in $(find . -type d -and -name 'shareeweb-*')
|
|
do ln -s ../main/external $i/external
|
|
done
|
|
|
|
fi
|
|
#end
|