diff options
author | d3v11 <d3v11@d3v11.ano> | 2011-11-25 22:34:39 +0000 |
---|---|---|
committer | d3v11 <d3v11@d3v11.ano> | 2011-11-25 22:34:39 +0000 |
commit | db2c109f7b1f3ebae5fe703bf8d38b218541b3b6 (patch) | |
tree | f15beb4d6c971032aa31932a38f8f0029edd8146 | |
parent | fcfc1c666c15243796ba7c886fe3a0ee7ad8b592 (diff) | |
download | resdb-db2c109f7b1f3ebae5fe703bf8d38b218541b3b6.tar.gz resdb-db2c109f7b1f3ebae5fe703bf8d38b218541b3b6.zip |
updated peer2anonet
-rwxr-xr-x | contrib/peer2anonet/peer2anonet | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/contrib/peer2anonet/peer2anonet b/contrib/peer2anonet/peer2anonet index 7e61543..fb8564f 100755 --- a/contrib/peer2anonet/peer2anonet +++ b/contrib/peer2anonet/peer2anonet @@ -6,10 +6,11 @@ fi USAGE(){ echo -e '\npeer2anonet:' - echo -e '\n --configure generate a new local configuration and exit' - echo -e '\n --update regenerate peer configurations' - echo -e '\n --configure-peer generate a new peer configuration and update' - echo -e '\n --rm-peer remove a peer configuration and update\n' + echo -e '\n --configure generate a new local configuration and exit' + echo -e '\n --update regenerate peer configurations' + echo -e '\n --configure-peer generate a new peer configuration and update' + echo -e '\n --rm-peer remove a peer configuration and update' + echo -e '\n --install-daemontools installs daemontools\n' exit 0 } @@ -264,6 +265,23 @@ RM_PEER(){ fi } +INSTALL_DAEMONTOOLS(){ + [[ $(echo X`which gcc`) == X ]] && echo ' error: cannot find gcc' + [[ $(echo X`which gcc`) == X ]] && exit 1 + [[ $(echo X`which make`) == X ]] && echo ' error: cannot find make' + [[ $(echo X`which make`) == X ]] && exit 1 + mkdir -p /package + chmod 1755 /package + cd /package + wget http://cr.yp.to/daemontools/daemontools-0.76.tar.gz + gunzip daemontools-0.76.tar + tar -xpf daemontools-0.76.tar + rm -f daemontools-0.76.tar + cd admin/daemontools-0.76 + sed -i 's/gcc/gcc -include errno.h/g' src/conf-cc + package/install + } + if [ "$1" == '--configure' ]; then CONFIGURE @@ -275,6 +293,8 @@ elif [ "$1" == '--configure-peer' ]; then elif [ "$1" == '--rm-peer' ]; then RM_PEER UPDATE +elif [ "$1" == '--rm-peer' ]; then + INSTALL_DAEMONTOOLS else USAGE fi |