Replace command to install toxcore

This commit is contained in:
Bob Mottram 2016-07-23 13:54:07 +01:00
parent 1d1145d699
commit 1acd047de1
1 changed files with 13 additions and 13 deletions

View File

@ -267,11 +267,7 @@ function install_tox_node {
return return
fi fi
${PROJECT_NAME}-mesh-install -f tox_node mesh_tox_node
if [ ! "$?" = "0" ]; then
echo $'Failed to install tox node'
exit 26778
fi
TOX_ONION_HOSTNAME=$(add_onion_service tox ${TOX_PORT} ${TOX_PORT}) TOX_ONION_HOSTNAME=$(add_onion_service tox ${TOX_PORT} ${TOX_PORT})
@ -381,10 +377,14 @@ function mesh_tox_node {
exit 16865 exit 16865
fi fi
chroot "$rootdir" apt-get -y install build-essential libtool autotools-dev mesh_tox_node_prefix=''
chroot "$rootdir" apt-get -y install automake checkinstall check git yasm if [ $rootdir ]; then
chroot "$rootdir" apt-get -y install libsodium13 libsodium-dev libcap2-bin mesh_tox_node_prefix="chroot \"$rootdir\""
chroot "$rootdir" apt-get -y install libconfig9 libconfig-dev autoconf fi
$mesh_tox_node_prefix apt-get -y install build-essential libtool autotools-dev
$mesh_tox_node_prefix apt-get -y install automake checkinstall check git yasm
$mesh_tox_node_prefix apt-get -y install libsodium13 libsodium-dev libcap2-bin
$mesh_tox_node_prefix apt-get -y install libconfig9 libconfig-dev autoconf
TEMP_SCRIPT_NAME=fbtmp37272.sh TEMP_SCRIPT_NAME=fbtmp37272.sh
TEMP_SCRIPT=/tmp/$TEMP_SCRIPT_NAME TEMP_SCRIPT=/tmp/$TEMP_SCRIPT_NAME
@ -397,7 +397,7 @@ function mesh_tox_node {
cd ${rootdir}$INSTALL_DIR/toxcore cd ${rootdir}$INSTALL_DIR/toxcore
git checkout $TOXCORE_COMMIT -b $TOXCORE_COMMIT git checkout $TOXCORE_COMMIT -b $TOXCORE_COMMIT
chroot "$rootdir" /bin/bash -x <<EOF $mesh_tox_node_prefix /bin/bash -x <<EOF
cd ${INSTALL_DIR}/toxcore cd ${INSTALL_DIR}/toxcore
autoreconf -i autoreconf -i
./configure --enable-daemon --disable-av ./configure --enable-daemon --disable-av
@ -408,7 +408,7 @@ EOF
cp $rootdir/usr/local/lib/libtoxcore* $rootdir/usr/lib/ cp $rootdir/usr/local/lib/libtoxcore* $rootdir/usr/lib/
cp ${rootdir}${INSTALL_DIR}/toxcore/other/bootstrap_daemon/tox-bootstrapd.service $rootdir/etc/systemd/system/ cp ${rootdir}${INSTALL_DIR}/toxcore/other/bootstrap_daemon/tox-bootstrapd.service $rootdir/etc/systemd/system/
sed -i 's|ExecStart=.*|ExecStart=/usr/local/bin/tox-bootstrapd --config /etc/tox-bootstrapd.conf|g' $rootdir/etc/systemd/system/tox-bootstrapd.service sed -i 's|ExecStart=.*|ExecStart=/usr/local/bin/tox-bootstrapd --config /etc/tox-bootstrapd.conf|g' $rootdir/etc/systemd/system/tox-bootstrapd.service
chroot "$rootdir" systemctl enable tox-bootstrapd.service $mesh_tox_node_prefix systemctl enable tox-bootstrapd.service
SECONDS=0 SECONDS=0
if [ ! -f $rootdir/usr/local/bin/tox-bootstrapd ]; then if [ ! -f $rootdir/usr/local/bin/tox-bootstrapd ]; then
@ -420,8 +420,8 @@ EOF
duration=$SECONDS duration=$SECONDS
echo $"Toxcore compile $(($duration / 60)) minutes and $(($duration % 60)) seconds elapsed." echo $"Toxcore compile $(($duration / 60)) minutes and $(($duration % 60)) seconds elapsed."
chroot "$rootdir" useradd --home-dir /var/lib/tox-bootstrapd --create-home --system --shell /sbin/nologin --comment $"Account to run Tox's DHT bootstrap daemon" --user-group tox-bootstrapd $mesh_tox_node_prefix useradd --home-dir /var/lib/tox-bootstrapd --create-home --system --shell /sbin/nologin --comment $"Account to run Tox's DHT bootstrap daemon" --user-group tox-bootstrapd
chroot "$rootdir" chmod 700 /var/lib/tox-bootstrapd $mesh_tox_node_prefix chmod 700 /var/lib/tox-bootstrapd
# remove Maildir # remove Maildir
if [ -d $rootdir/var/lib/tox-bootstrapd/Maildir ]; then if [ -d $rootdir/var/lib/tox-bootstrapd/Maildir ]; then