wok-current rev 12350
boxbackup-server: new default dir
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Thu Apr 19 21:00:41 2012 +0200 (2012-04-19) |
parents | 591795b60a3e |
children | e7e64bbf2386 |
files | boxbackup-server/receipt |
line diff
1.1 --- a/boxbackup-server/receipt Thu Apr 19 18:35:25 2012 +0200 1.2 +++ b/boxbackup-server/receipt Thu Apr 19 21:00:41 2012 +0200 1.3 @@ -4,7 +4,7 @@ 1.4 VERSION="0.11.1" 1.5 CATEGORY="network" 1.6 SHORT_DESC="Server for the BoxBackup on-line backup system" 1.7 -MAINTAINER="domcox@users.sourceforge.net" 1.8 +MAINTAINER="domcox@slitaz.org" 1.9 DEPENDS="db libedit openssl perl zlib gcc-lib-base" 1.10 BUILD_DEPENDS="db-dev libedit-dev openssl-dev zlib-dev" 1.11 SOURCE="boxbackup" 1.12 @@ -12,12 +12,13 @@ 1.13 WEB_SITE="http://www.boxbackup.org/" 1.14 # stable 1.15 # WGET_URL="$SF_MIRROR/$SOURCE/$TARBALL" 1.16 -WGET_URL="http://www.boxbackup.org/svn/box/packages/$TARBALL" 1.17 +#WGET_URL="http://www.boxbackup.org/svn/box/packages/$TARBALL" 1.18 +WGET_URL="http://www.boxbackup.org/browser/box/packages/$TARBALL" 1.19 TAGS="backup automatic server network" 1.20 1.21 # Configuration variables 1.22 -HOSTNAME=`ifconfig | awk -F ":" '/cast/ {print substr($2,0, index($2," ")-1) }'` 1.23 -CONF_DIR="/etc/box" 1.24 +HOSTNAME=$(ifconfig | awk -F ":" '/cast/ {print substr($2,0, index($2," ")-1) }') 1.25 +CONF_DIR="/etc/boxbackup" 1.26 DATA_DIR="/var/lib/bbstored" 1.27 CA_DIR="${CONF_DIR}/ca" 1.28 BBUSER="bbstored" 1.29 @@ -58,6 +59,11 @@ 1.30 1.31 post_install() 1.32 { 1.33 + # default conf dir is now /etc/boxbackup 1.34 + if [ ! -e /etc/box/bbstored.conf ]; then 1.35 + mv /etc/box $CONF_DIR 1.36 + fi 1.37 + 1.38 # adduser BBUSER if needed 1.39 if ! grep -q $BBUSER $1/etc/passwd; then 1.40 echo -n "Adding user '$BBUSER'..." 1.41 @@ -91,8 +97,8 @@ 1.42 if [ ! -e $CONF_DIR/bbstored.conf ]; then 1.43 # Setting hostname 1.44 echo -n "Setting hostname... " 1.45 - if [ `hostname -f 2>1 > /dev/null;echo $?` -eq 0 ]; then 1.46 - HOSTNAME=`hostname -f` 1.47 + if [ $(hostname -f 2>1 > /dev/null;echo $?) -eq 0 ]; then 1.48 + HOSTNAME=$(hostname -f) 1.49 fi 1.50 if [ -z $HOSTNAME ]; then 1.51 HOSTNAME="127.0.0.1" 1.52 @@ -177,7 +183,7 @@ 1.53 status 1.54 fi 1.55 # Delete $CONF_DIR (if empty) 1.56 - if [ `ls -lA $CONF_DIR | wc -l` -eq 0 ]; then 1.57 + if [ $(ls -lA $CONF_DIR | wc -l) -eq 0 ]; then 1.58 echo -n "Removing $CONF_DIR..." 1.59 rm -r $CONF_DIR 1.60 status