|
@@ -121,29 +121,22 @@ function install_toxcore {
|
121
|
121
|
sudo cp /tmp/tox-bootstrapd.conf /etc/tox-bootstrapd.conf
|
122
|
122
|
rm /tmp/tox-bootstrapd.conf
|
123
|
123
|
|
124
|
|
- if [ -f /bin/systemctl ]; then
|
125
|
|
- if [ ! -f ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service ]; then
|
126
|
|
- echo $"File not found ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service"
|
127
|
|
- exit 7359
|
128
|
|
- fi
|
129
|
|
- sudo cp ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service /etc/systemd/system/
|
130
|
|
-
|
131
|
|
- sudo systemctl daemon-reload
|
132
|
|
- sudo systemctl enable tox-bootstrapd.service
|
133
|
|
- sudo systemctl start tox-bootstrapd.service
|
134
|
|
- if [ ! "$?" = "0" ]; then
|
135
|
|
- sudo systemctl status tox-bootstrapd.service
|
136
|
|
- exit 5846
|
137
|
|
- fi
|
|
124
|
+ if [ ! -f ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service ]; then
|
|
125
|
+ echo $"File not found ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service"
|
|
126
|
+ exit 7359
|
|
127
|
+ fi
|
|
128
|
+ sudo cp ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.service /etc/systemd/system/
|
138
|
129
|
|
139
|
|
- sudo systemctl restart tox-bootstrapd.service
|
140
|
|
- else
|
141
|
|
- sudo cp ~/develop/toxcore/other/bootstrap_daemon/tox-bootstrapd.sh /etc/init.d/tox-bootstrapd
|
142
|
|
- sudo chmod 755 /etc/init.d/tox-bootstrapd
|
143
|
|
- sudo update-rc.d tox-bootstrapd defaults
|
144
|
|
- sudo service tox-bootstrapd start
|
|
130
|
+ sudo systemctl daemon-reload
|
|
131
|
+ sudo systemctl enable tox-bootstrapd.service
|
|
132
|
+ sudo systemctl start tox-bootstrapd.service
|
|
133
|
+ if [ ! "$?" = "0" ]; then
|
|
134
|
+ sudo systemctl status tox-bootstrapd.service
|
|
135
|
+ exit 5846
|
145
|
136
|
fi
|
146
|
137
|
|
|
138
|
+ sudo systemctl restart tox-bootstrapd.service
|
|
139
|
+
|
147
|
140
|
TOX_PUBLIC_KEY=$(cat /var/log/syslog | grep tox | grep "Public Key" | awk -F ' ' '{print $8}' | tail -1)
|
148
|
141
|
if [ ${#TOX_PUBLIC_KEY} -lt 30 ]; then
|
149
|
142
|
echo $'Could not obtain the tox node public key'
|