Fixed an error in installation script

Because of the forward slashes in the directory, sed did not work. This
is solved in this commit by replacing the / separators with |.
This commit is contained in:
Dennis Potter 2019-01-12 18:20:39 +01:00
parent eaf6561ffd
commit d4e3b11072

View File

@ -110,10 +110,10 @@ read -p 'Matrix username: ' username
read -p 'Matrix password: ' password
read -p 'Super user: ' superuser
sed -e "s/\${server}/${server}/"\
-e "s/\${username}/${username}/"\
-e "s/\${password}/${password}/"\
-e "s/\${superuser}/${superuser}/"\
sed -e "s|\${server}|${server}|"\
-e "s|\${username}|${username}|"\
-e "s|\${password}|${password}|"\
-e "s|\${superuser}|${superuser}|"\
$DIR/config.json.template > $DIR/config.json
#################################################################
@ -125,7 +125,7 @@ fi
sudo useradd -r mchatbot
sed -e "s/\${DIR}/${DIR}/"\
sed -e "s|\${DIR}|${DIR}|"\
$DIR/plugable-matrix-bot.service.template > $DIR/plugable-matrix-bot.service
sudo mv $DIR/plugable-matrix-bot.service /etc/systemd/system/plugable-matrix-bot.service