Index: /trunk/klask-push-web =================================================================== --- /trunk/klask-push-web (revision 86) +++ /trunk/klask-push-web (revision 87) @@ -5,6 +5,4 @@ # 2011/03/30 gabriel - make it generic -TMP='/tmp/klask-push-web' - SITE_NAME='' REMOTE_SERVER=localhost @@ -12,10 +10,13 @@ REMOTE_FOLDER=/var/www/klask/ -if test -f /etc/klask/push-web.conf +if [ -f /etc/klask/push-web.conf ] then . /etc/klask/push-web.conf fi +TMP='/tmp/klask-push-web' + +# local command MKDIR=/bin/mkdir DATE=/bin/date @@ -28,7 +29,10 @@ RSYNC=/usr/bin/rsync +# remote command +DOT=/usr/bin/dot -$MKDIR -p $TMP -if test ! -d ${TMP} + +$MKDIR -p ${TMP} +if [ ! -d ${TMP} ] then echo "Error: Folder ${TMP} do not exist !" @@ -99,4 +103,5 @@
+ @@ -128,5 +133,5 @@ END -if test ${REMOTE_SERVER} = 'localhost' +if [ ${REMOTE_SERVER} = 'localhost' ] then $RSYNC \ @@ -139,5 +144,5 @@ ${REMOTE_FOLDER}/ - (cd ${REMOTE_FOLDER}; dot -T png switch-map.txt > switch-map.png) + [ -x ${DOT} ] && (cd ${REMOTE_FOLDER}; ${DOT} -T png switch-map.txt > switch-map.png) else @@ -152,4 +157,4 @@ - $SSH ${REMOTE_USER}@${REMOTE_SERVER} "(cd ${REMOTE_FOLDER}; dot -T png switch-map.txt > switch-map.png)" + $SSH ${REMOTE_USER}@${REMOTE_SERVER} "(cd ${REMOTE_FOLDER}; ${DOT} -T png switch-map.txt > switch-map.png)" fi