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
fi
${PROJECT_NAME}-mesh-install -f tox_node
if [ ! "$?" = "0" ]; then
echo $'Failed to install tox node'
exit 26778
fi
mesh_tox_node
TOX_ONION_HOSTNAME=$(add_onion_service tox ${TOX_PORT} ${TOX_PORT})
@ -381,10 +377,14 @@ function mesh_tox_node {
exit 16865
fi
chroot "$rootdir" apt-get -y install build-essential libtool autotools-dev
chroot "$rootdir" apt-get -y install automake checkinstall check git yasm
chroot "$rootdir" apt-get -y install libsodium13 libsodium-dev libcap2-bin
chroot "$rootdir" apt-get -y install libconfig9 libconfig-dev autoconf
mesh_tox_node_prefix=''
if [ $rootdir ]; then
mesh_tox_node_prefix="chroot \"$rootdir\""
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=/tmp/$TEMP_SCRIPT_NAME
@ -397,7 +397,7 @@ function mesh_tox_node {
cd ${rootdir}$INSTALL_DIR/toxcore
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
autoreconf -i
./configure --enable-daemon --disable-av
@ -408,7 +408,7 @@ EOF
cp $rootdir/usr/local/lib/libtoxcore* $rootdir/usr/lib/
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
chroot "$rootdir" systemctl enable tox-bootstrapd.service
$mesh_tox_node_prefix systemctl enable tox-bootstrapd.service
SECONDS=0
if [ ! -f $rootdir/usr/local/bin/tox-bootstrapd ]; then
@ -420,8 +420,8 @@ EOF
duration=$SECONDS
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
chroot "$rootdir" chmod 700 /var/lib/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
$mesh_tox_node_prefix chmod 700 /var/lib/tox-bootstrapd
# remove Maildir
if [ -d $rootdir/var/lib/tox-bootstrapd/Maildir ]; then