|
@@ -267,11 +267,7 @@ function install_tox_node {
|
267
|
267
|
return
|
268
|
268
|
fi
|
269
|
269
|
|
270
|
|
- ${PROJECT_NAME}-mesh-install -f tox_node
|
271
|
|
- if [ ! "$?" = "0" ]; then
|
272
|
|
- echo $'Failed to install tox node'
|
273
|
|
- exit 26778
|
274
|
|
- fi
|
|
270
|
+ mesh_tox_node
|
275
|
271
|
|
276
|
272
|
TOX_ONION_HOSTNAME=$(add_onion_service tox ${TOX_PORT} ${TOX_PORT})
|
277
|
273
|
|
|
@@ -381,10 +377,14 @@ function mesh_tox_node {
|
381
|
377
|
exit 16865
|
382
|
378
|
fi
|
383
|
379
|
|
384
|
|
- chroot "$rootdir" apt-get -y install build-essential libtool autotools-dev
|
385
|
|
- chroot "$rootdir" apt-get -y install automake checkinstall check git yasm
|
386
|
|
- chroot "$rootdir" apt-get -y install libsodium13 libsodium-dev libcap2-bin
|
387
|
|
- chroot "$rootdir" apt-get -y install libconfig9 libconfig-dev autoconf
|
|
380
|
+ mesh_tox_node_prefix=''
|
|
381
|
+ if [ $rootdir ]; then
|
|
382
|
+ mesh_tox_node_prefix="chroot \"$rootdir\""
|
|
383
|
+ fi
|
|
384
|
+ $mesh_tox_node_prefix apt-get -y install build-essential libtool autotools-dev
|
|
385
|
+ $mesh_tox_node_prefix apt-get -y install automake checkinstall check git yasm
|
|
386
|
+ $mesh_tox_node_prefix apt-get -y install libsodium13 libsodium-dev libcap2-bin
|
|
387
|
+ $mesh_tox_node_prefix apt-get -y install libconfig9 libconfig-dev autoconf
|
388
|
388
|
|
389
|
389
|
TEMP_SCRIPT_NAME=fbtmp37272.sh
|
390
|
390
|
TEMP_SCRIPT=/tmp/$TEMP_SCRIPT_NAME
|
|
@@ -397,7 +397,7 @@ function mesh_tox_node {
|
397
|
397
|
cd ${rootdir}$INSTALL_DIR/toxcore
|
398
|
398
|
git checkout $TOXCORE_COMMIT -b $TOXCORE_COMMIT
|
399
|
399
|
|
400
|
|
- chroot "$rootdir" /bin/bash -x <<EOF
|
|
400
|
+ $mesh_tox_node_prefix /bin/bash -x <<EOF
|
401
|
401
|
cd ${INSTALL_DIR}/toxcore
|
402
|
402
|
autoreconf -i
|
403
|
403
|
./configure --enable-daemon --disable-av
|
|
@@ -408,7 +408,7 @@ EOF
|
408
|
408
|
cp $rootdir/usr/local/lib/libtoxcore* $rootdir/usr/lib/
|
409
|
409
|
cp ${rootdir}${INSTALL_DIR}/toxcore/other/bootstrap_daemon/tox-bootstrapd.service $rootdir/etc/systemd/system/
|
410
|
410
|
sed -i 's|ExecStart=.*|ExecStart=/usr/local/bin/tox-bootstrapd --config /etc/tox-bootstrapd.conf|g' $rootdir/etc/systemd/system/tox-bootstrapd.service
|
411
|
|
- chroot "$rootdir" systemctl enable tox-bootstrapd.service
|
|
411
|
+ $mesh_tox_node_prefix systemctl enable tox-bootstrapd.service
|
412
|
412
|
|
413
|
413
|
SECONDS=0
|
414
|
414
|
if [ ! -f $rootdir/usr/local/bin/tox-bootstrapd ]; then
|
|
@@ -420,8 +420,8 @@ EOF
|
420
|
420
|
duration=$SECONDS
|
421
|
421
|
echo $"Toxcore compile $(($duration / 60)) minutes and $(($duration % 60)) seconds elapsed."
|
422
|
422
|
|
423
|
|
- 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
|
424
|
|
- chroot "$rootdir" chmod 700 /var/lib/tox-bootstrapd
|
|
423
|
+ $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
|
|
424
|
+ $mesh_tox_node_prefix chmod 700 /var/lib/tox-bootstrapd
|
425
|
425
|
|
426
|
426
|
# remove Maildir
|
427
|
427
|
if [ -d $rootdir/var/lib/tox-bootstrapd/Maildir ]; then
|