onako 0.1.1__py3-none-any.whl → 0.1.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- onako/__init__.py +1 -1
- onako/cli.py +33 -2
- {onako-0.1.1.dist-info → onako-0.1.2.dist-info}/METADATA +1 -1
- {onako-0.1.1.dist-info → onako-0.1.2.dist-info}/RECORD +7 -7
- {onako-0.1.1.dist-info → onako-0.1.2.dist-info}/WHEEL +0 -0
- {onako-0.1.1.dist-info → onako-0.1.2.dist-info}/entry_points.txt +0 -0
- {onako-0.1.1.dist-info → onako-0.1.2.dist-info}/top_level.txt +0 -0
onako/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.2"
|
onako/cli.py
CHANGED
|
@@ -85,11 +85,36 @@ def _install_launchd(onako_bin, host, port, path_value):
|
|
|
85
85
|
)
|
|
86
86
|
plist_path = Path.home() / "Library" / "LaunchAgents" / "com.onako.server.plist"
|
|
87
87
|
plist_path.parent.mkdir(parents=True, exist_ok=True)
|
|
88
|
+
|
|
89
|
+
# Unload existing service if present
|
|
90
|
+
uid = os.getuid()
|
|
91
|
+
subprocess.run(
|
|
92
|
+
["launchctl", "bootout", f"gui/{uid}", str(plist_path)],
|
|
93
|
+
capture_output=True,
|
|
94
|
+
)
|
|
95
|
+
|
|
88
96
|
plist_path.write_text(plist)
|
|
89
|
-
|
|
97
|
+
|
|
98
|
+
# Register and start the service
|
|
99
|
+
result = subprocess.run(
|
|
100
|
+
["launchctl", "bootstrap", f"gui/{uid}", str(plist_path)],
|
|
101
|
+
capture_output=True, text=True,
|
|
102
|
+
)
|
|
103
|
+
if result.returncode != 0:
|
|
104
|
+
subprocess.run(["launchctl", "load", str(plist_path)], check=True)
|
|
105
|
+
|
|
106
|
+
# kickstart forces the service to run now (bootstrap alone may not start it)
|
|
107
|
+
subprocess.run(
|
|
108
|
+
["launchctl", "kickstart", f"gui/{uid}/com.onako.server"],
|
|
109
|
+
capture_output=True,
|
|
110
|
+
)
|
|
111
|
+
|
|
90
112
|
click.echo(f"Installed launchd service: {plist_path}")
|
|
91
113
|
click.echo(f"Logs: {LOG_DIR}")
|
|
92
114
|
click.echo(f"Onako is running at http://{host}:{port}")
|
|
115
|
+
click.echo()
|
|
116
|
+
click.echo("If macOS blocks this service, allow it in:")
|
|
117
|
+
click.echo(" System Settings > General > Login Items & Extensions")
|
|
93
118
|
|
|
94
119
|
|
|
95
120
|
def _install_systemd(onako_bin, host, port, path_value):
|
|
@@ -117,7 +142,13 @@ def uninstall():
|
|
|
117
142
|
if system == "Darwin":
|
|
118
143
|
plist_path = Path.home() / "Library" / "LaunchAgents" / "com.onako.server.plist"
|
|
119
144
|
if plist_path.exists():
|
|
120
|
-
|
|
145
|
+
uid = os.getuid()
|
|
146
|
+
result = subprocess.run(
|
|
147
|
+
["launchctl", "bootout", f"gui/{uid}", str(plist_path)],
|
|
148
|
+
capture_output=True,
|
|
149
|
+
)
|
|
150
|
+
if result.returncode != 0:
|
|
151
|
+
subprocess.run(["launchctl", "unload", str(plist_path)], capture_output=True)
|
|
121
152
|
plist_path.unlink()
|
|
122
153
|
click.echo("Onako service removed.")
|
|
123
154
|
else:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
onako/__init__.py,sha256=
|
|
2
|
-
onako/cli.py,sha256=
|
|
1
|
+
onako/__init__.py,sha256=YvuYzWnKtqBb-IqG8HAu-nhIYAsgj9Vmc_b9o7vO-js,22
|
|
2
|
+
onako/cli.py,sha256=_vDVf7R7FdsNvQiQT7i5ZK5jtPeJtx7T2aLVSJki87g,6733
|
|
3
3
|
onako/server.py,sha256=lBNaT8Xq5Jw8EpN1CZNWzKQ2TudAMpSE4L0PY4ucW10,2065
|
|
4
4
|
onako/tmux_orchestrator.py,sha256=rLNVrCcam2iF412WKX_5hAiMCBHmi8sNhDPD4KvEiU8,6080
|
|
5
5
|
onako/static/index.html,sha256=7TjxfF38Spnuerd6u0vbwGpJApstsxzVS3F-YUGCp7I,14403
|
|
6
6
|
onako/templates/com.onako.server.plist.tpl,sha256=kOFbOXVLP8ULAyV66fEloI4y1iFPmUSrudyjSCB-pwc,857
|
|
7
7
|
onako/templates/onako.service.tpl,sha256=TKGFoDraWyA4VEQYXZodtJF2m5ZjIVSezaDAAB83Vl4,229
|
|
8
|
-
onako-0.1.
|
|
9
|
-
onako-0.1.
|
|
10
|
-
onako-0.1.
|
|
11
|
-
onako-0.1.
|
|
12
|
-
onako-0.1.
|
|
8
|
+
onako-0.1.2.dist-info/METADATA,sha256=nEPWBgu2iofpVXXNpZ9u9EChYyPIfzWZS6eOXZvpi-g,1593
|
|
9
|
+
onako-0.1.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
10
|
+
onako-0.1.2.dist-info/entry_points.txt,sha256=51KRJzuVpr69iT_k4JO0Lj3DQv_HbgtGjTBTev13JAQ,41
|
|
11
|
+
onako-0.1.2.dist-info/top_level.txt,sha256=EZsc5qq2paM9GTbaFE9Xar4B5wFdfIqK9l_bDQVcmZ4,6
|
|
12
|
+
onako-0.1.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|