mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-03-28 17:43:05 +01:00
Idempotentify and remove the explicit setup instructions in the advanced readme
This commit is contained in:
@@ -206,6 +206,12 @@ fi
|
||||
|
||||
# ── systemd service file ───────────────────────────────────────────────────────
|
||||
|
||||
if sudo systemctl is-active --quiet "$SERVICE_NAME"; then
|
||||
echo -e "${YELLOW}${SERVICE_NAME} is currently running; stopping it before applying changes...${NC}"
|
||||
sudo systemctl stop "$SERVICE_NAME"
|
||||
echo
|
||||
fi
|
||||
|
||||
echo -e "${YELLOW}Writing systemd service file to ${SERVICE_FILE}...${NC}"
|
||||
|
||||
generate_service_file() {
|
||||
@@ -263,9 +269,10 @@ echo
|
||||
|
||||
# ── enable and start ───────────────────────────────────────────────────────────
|
||||
|
||||
echo -e "${YELLOW}Enabling and starting ${SERVICE_NAME}...${NC}"
|
||||
echo -e "${YELLOW}Reloading systemd and applying ${SERVICE_NAME}...${NC}"
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now "$SERVICE_NAME"
|
||||
sudo systemctl enable "$SERVICE_NAME"
|
||||
sudo systemctl start "$SERVICE_NAME"
|
||||
echo
|
||||
|
||||
# ── status check ───────────────────────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user