Browse Source

No completion file on mesh install

Bob Mottram 8 years ago
parent
commit
e479c43333
No account linked to committer's email
1 changed files with 7 additions and 3 deletions
  1. 7
    3
      src/freedombone-app-tox

+ 7
- 3
src/freedombone-app-tox View File

189
 }
189
 }
190
 
190
 
191
 function configure_firewall_for_tox {
191
 function configure_firewall_for_tox {
192
-	if grep -Fxq "configure_firewall_for_tox" $COMPLETION_FILE; then
193
-		return
192
+	if [ -f $COMPLETION_FILE ]; then
193
+		if grep -Fxq "configure_firewall_for_tox" $COMPLETION_FILE; then
194
+			return
195
+		fi
194
 	fi
196
 	fi
195
 	if [[ $INSTALLED_WITHIN_DOCKER == "yes" ]]; then
197
 	if [[ $INSTALLED_WITHIN_DOCKER == "yes" ]]; then
196
 		# docker does its own firewalling
198
 		# docker does its own firewalling
204
 	save_firewall_settings
206
 	save_firewall_settings
205
 
207
 
206
 	OPEN_PORTS+=("Tox      $TOX_PORT")
208
 	OPEN_PORTS+=("Tox      $TOX_PORT")
207
-	echo 'configure_firewall_for_tox' >> $COMPLETION_FILE
209
+	if [ -f $COMPLETION_FILE ]; then
210
+		echo 'configure_firewall_for_tox' >> $COMPLETION_FILE
211
+	fi
208
 }
212
 }
209
 
213
 
210
 function tox_avahi {
214
 function tox_avahi {