Bad sed syntax

This commit is contained in:
Bob Mottram 2017-03-04 22:55:30 +00:00
parent 873f67068d
commit 392dd085fe
1 changed files with 6 additions and 6 deletions

View File

@ -63,23 +63,23 @@ function tahoelafs_setup_config {
if ! grep -q "reveal-IP-address" $config_file; then
sed -i '/[node]/a reveal-IP-address = False' $config_file
else
sed -i 's|reveal-IP-address.*|reveal-IP-address = False|g' >> $config_file
sed -i 's|reveal-IP-address.*|reveal-IP-address = False|g' $config_file
fi
if ! grep -q "tcp =" $config_file; then
sed -i '/[connections]/a tcp = tor' $config_file
else
sed -i 's|tcp =.*|tcp = tor|g' >> $config_file
sed -i 's|tcp =.*|tcp = tor|g' $config_file
fi
if ! grep -q "tub.location =" $config_file; then
sed -i '/[node]/a tub.location = disabled' >> $config_file
sed -i '/[node]/a tub.location = disabled' $config_file
fi
if ! grep -q "tub.port =" $config_file; then
sed -i "/[node]/a tub.port = tcp:${TAHOELAFS_ONION_PORT}:interface=127.0.0.1" >> $config_file
sed -i "/[node]/a tub.port = tcp:${TAHOELAFS_ONION_PORT}:interface=127.0.0.1" $config_file
fi
sed -i "s|tub.port.*|tub.port = tcp:${TAHOELAFS_ONION_PORT}:interface=127.0.0.1|g" >> $config_file
sed -i "s|tub.location.*|tub.location = tor:${TAHOELAFS_ONION_HOSTNAME}:${TAHOELAFS_PORT}|g" >> $config_file
sed -i "s|tub.port.*|tub.port = tcp:${TAHOELAFS_ONION_PORT}:interface=127.0.0.1|g" $config_file
sed -i "s|tub.location.*|tub.location = tor:${TAHOELAFS_ONION_HOSTNAME}:${TAHOELAFS_PORT}|g" $config_file
sed -i "s|nickname =.*|nickname = $HOSTNAME|g" $config_file