Server synchronisation
This commit is contained in:
parent
4b101ef4b2
commit
bbec08ac4f
6 changed files with 218 additions and 18 deletions
23
synchro.sh
Executable file
23
synchro.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
cd `dirname "$0"`
|
||||
|
||||
if [ "$UID" = "0" ]
|
||||
then
|
||||
SCRIPT=`pwd`/`basename "$0"`
|
||||
su -c "sh $SCRIPT" synchro
|
||||
exit $?
|
||||
fi
|
||||
|
||||
rsync -e ssh -av --delete out/localhost/* phobos:~/htdocs/
|
||||
rsync -e ssh -av --delete out/teams phobos:~/
|
||||
rsync -e ssh -av --delete files phobos:~/
|
||||
rsync -e ssh -av --delete misc phobos:~/
|
||||
scp nginx.conf submission.php phobos:~/
|
||||
|
||||
rsync -e ssh -av --delete out/localhost/* phobos:~/htdocs/
|
||||
|
||||
rsync -e ssh -av phobos:~/submission/ submission/
|
||||
ssh phobos "rm ~/submission/*"
|
||||
|
||||
exit $?
|
||||
Reference in a new issue