Add start, stop, and restart helper scripts with baked-in venv checks
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
# Change directory to the project root
|
||||
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
try:
|
||||
import manage_webui
|
||||
except ImportError:
|
||||
print("Error: manage_webui.py not found in the project root.", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
manage_webui.stop()
|
||||
time.sleep(1)
|
||||
|
||||
# Setup check and auto-install baked in
|
||||
if not os.path.exists(manage_webui.VENV_DIR):
|
||||
print("Virtual environment not found. Initializing setup...")
|
||||
manage_webui.setup()
|
||||
print("")
|
||||
|
||||
manage_webui.start()
|
||||
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Change directory to the project root
|
||||
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
try:
|
||||
import manage_webui
|
||||
except ImportError:
|
||||
print("Error: manage_webui.py not found in the project root.", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Setup check and auto-install baked in
|
||||
if not os.path.exists(manage_webui.VENV_DIR):
|
||||
print("Virtual environment not found. Initializing setup...")
|
||||
manage_webui.setup()
|
||||
print("")
|
||||
|
||||
manage_webui.start()
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
|
||||
# Change directory to the project root
|
||||
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
try:
|
||||
import manage_webui
|
||||
except ImportError:
|
||||
print("Error: manage_webui.py not found in the project root.", file=sys.stderr)
|
||||
sys.exit(1)
|
||||
|
||||
if __name__ == '__main__':
|
||||
manage_webui.stop()
|
||||
Reference in New Issue
Block a user