]> err.no Git - scalable-opengroupware.org/blob - Scripts/sogocron.sh
git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1052 d1b88da0-ebda-0310...
[scalable-opengroupware.org] / Scripts / sogocron.sh
1 #!/bin/sh
2
3 export PATH=/usr/local/sbin:$PATH
4
5 cd /root/SOGo
6 # echo "Pulling monotone repository"
7
8 oldversion=$(mtn status)
9 mtn pull >& /dev/null
10 mtn update >& /dev/null
11 newversion=$(mtn status)
12
13 if [ "$oldversion" == "$newversion" ]
14 then
15   exit 0
16 fi
17
18 echo "SOGo mainsite updated at $(date)..."
19
20 . /root/GNUstep/Library/Makefiles/GNUstep.sh >& /dev/null
21 make distclean > /dev/null
22 ./configure --disable-strip --without-gnustep >& /dev/null
23 make -s > /dev/null
24 rm -rf /usr/local/lib/sogod-0.9
25 make -s install > /dev/null
26 # echo "Copying templates to /usr/local/share/sogo-0.9/templates"
27 # rm -rf /usr/local/share/sogo-0.9/templates
28 # cp -a UI/Templates /usr/local/share/sogo-0.9/templates
29 # echo "Copying web resources to /usr/local/share/sogo-0.9/www"
30 # cp -a UI/WebServerResources /usr/local/share/sogo-0.9/www
31 # echo "Killing server"
32 pkill sogod-0.9 >& /dev/null
33 # echo "Starting sogod-0.9 (log in /var/log/sogod)"
34 echo "Launching on $(date)" > /var/log/sogod
35 sogod-0.9 >> /var/log/sogod 2>&1 &
36