Change tox bootstrap user in amnesic

This commit is contained in:
Bob Mottram 2016-07-30 12:24:19 +01:00
parent 8d69b56702
commit 78508be07d
1 changed files with 6 additions and 0 deletions

View File

@ -424,6 +424,12 @@ function configure_toxcore {
if [ -f $MESH_AMNESIC ]; then if [ -f $MESH_AMNESIC ]; then
# change to the amnesic mount # change to the amnesic mount
sed -i 's|/var/lib/tox-bootstrapd|/media/tox-bootstrapd|g' /etc/tox-bootstrapd.conf sed -i 's|/var/lib/tox-bootstrapd|/media/tox-bootstrapd|g' /etc/tox-bootstrapd.conf
systemctl stop tox-bootstrapd.service
sed -i 's|WorkingDirectory=.*|WorkingDirectory=/media/tox-bootstrapd|g' /etc/systemd/system/tox-bootstrapd.service
systemctl daemon-reload
userdel -r tox-bootstrapd
useradd --home-dir /media/tox-bootstrapd --create-home --system --shell /sbin/nologin --comment "Account to run Tox's DHT bootstrap daemon" --user-group tox-bootstrapd
chmod 700 /media/tox-bootstrapd
fi fi
echo $'Enabling toxcore daemon' >> $INSTALL_LOG echo $'Enabling toxcore daemon' >> $INSTALL_LOG