meshenger now changes the working directory to /meshenger/, fixed the lazyinstall
This commit is contained in:
parent
45bd9f3bb0
commit
5e46d14d13
@ -16,7 +16,7 @@ head -n 10 /etc/config/wireless >> tmp_wireless
|
||||
cat wireless >> tmp_wireless
|
||||
mv tmp_wireless /etc/config/wireless
|
||||
|
||||
cat firewall >> /etc/config/firewall
|
||||
cat firewall >>ls /etc/config/firewall
|
||||
|
||||
mv dhcp /etc/config/dhcp
|
||||
|
||||
|
5
main.py
5
main.py
@ -15,6 +15,9 @@ class Meshenger:
|
||||
|
||||
os.system("echo 1 >> /proc/sys/net/ipv6/conf/br-lan/disable_ipv6")
|
||||
os.system("echo 1 >> /proc/sys/net/ipv6/conf/br-hotspot/disable_ipv6")
|
||||
|
||||
os.chdir(os.path.dirname(__file__)) # change present working directory to the one where this file is
|
||||
|
||||
self.own_ip = self.get_ip_adress().strip()
|
||||
|
||||
if not os.path.exists(self.msg_dir):
|
||||
@ -234,7 +237,7 @@ Hack to adhoc0's inet6 adress
|
||||
"""
|
||||
if not os.path.isfile('interfaceip6adress'):
|
||||
os.system('ifconfig -a adhoc0 | grep inet6 > /root/meshenger/interfaceip6adress')
|
||||
with open('interfaceip6adress', 'r') as a:
|
||||
with open('/root/meshenger/interfaceip6adress', 'r') as a:
|
||||
return a.read().split()[2].split('/')[0]
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@ class ClientServeHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
self.send_header('Content-type', 'text/html')
|
||||
self.end_headers()
|
||||
|
||||
f = os.path.join( "webapp.html")
|
||||
f = os.path.join('/home/root/meshenger/',"webapp.html")
|
||||
with open( f, 'r') as the_file:
|
||||
self.wfile.write(the_file.read())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user