Skip to content

Commit e81f623

Browse files
committed
Merge branch 'new_init'
2 parents 39b8153 + 42d2091 commit e81f623

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

noma/install.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,9 +403,30 @@ def install_crontab():
403403
call(["/usr/bin/crontab", "/home/lncm/crontab"])
404404

405405

406+
def enable_dbus():
407+
print("Enable dbus at boot")
408+
exitcode = call(["rc-update", "add", "dbus"])
409+
return exitcode
410+
411+
412+
def enable_docker():
413+
print("Enable docker at boot")
414+
exitcode = call(["rc-update", "add", "docker"])
415+
return exitcode
416+
417+
418+
def enable_avahi():
419+
print("Enable avahi-daemon at boot")
420+
exitcode = call(["rc-update", "add", "avahi-daemon"])
421+
return exitcode
422+
423+
406424
def enable_compose():
425+
# TODO: Change init script to run "noma start" and "noma stop"
407426
print("Enable docker-compose at boot")
408-
exitcode = call(["rc-update", "add", "docker-compose", "default"])
427+
check_to_fetch("/etc/init.d/docker-compose",
428+
"https://raw.githubusercontent.com/lncm/pi-factory/b12c6f43d11be58dac03a2513cfd2abbb16f6526/etc/init.d/docker-compose")
429+
exitcode = call(["rc-update", "add", "docker-compose"])
409430
return exitcode
410431

411432

@@ -417,6 +438,7 @@ def install_tor():
417438

418439

419440
def enable_tor():
441+
print("Enable tor at boot")
420442
persist_tor = run(["rc-update", "add", "tor", "default"])
421443
return persist_tor.returncode
422444

@@ -436,6 +458,9 @@ def install_box():
436458
install_firmware() # for raspberry-pi
437459
install_apk_deps() # curl & jq; are these really necessary?
438460
install_compose()
461+
enable_dbus()
462+
enable_avahi()
463+
enable_docker()
439464
enable_compose()
440465
install_tor()
441466
enable_tor()

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name="noma",
5-
version="0.4.3",
5+
version="0.4.4",
66
packages=["noma"],
77
install_requires=["psutil", "docopt", "requests"],
88
entry_points={"console_scripts": ["noma = noma.noma:main"]},

0 commit comments

Comments
 (0)