changkun / changkun/midgard

automatic run midgard in background ?

Open
#29 2 comments 0 reactions 0 assignees View on GitHub
help wanted NeedsInvestigation
Dominant language
Go
Stars
227
Forks
21
PR merge metrics
No merged PRs in 30d

Description

I want to run the midgard daemon in background whenever I restart my machine (all platforms)

on **Linux** I wasn't able to achieve by running mg on "sudo" and it isn't working. I tried even Docker doesn't work either,[ it says docker image not found or something](https://i.imgur.com/ybprfIv.png)
```
[Desktop Entry]
Name=Midgard
Type=Application
Exec=bash -c 'sleep 60;cd /home/pi/Server7/midgard && sudo mg server'
Terminal=false
Comment=midgard.
Categories=Utility;
```

On **Windows** I am unable to achieve this

I used the below commands on admin powershell windows and even on cmd terminal. The mg.exe shows its running on the Task Manager but nothing works. When I kill the process and start using "mg daemon run" then it works fine on the terminal windows.
`mg daemon install`
`mg daemon start`

Running `mg status` shows OK for both server and client for some reason.

What am I doing wrong ?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the `mg daemon install`, `mg daemon start`, `mg daemon run`, and `mg status` entry points, reproducing the reported behavior on Linux and Windows. Compare background startup with running `mg daemon run` directly; done means the daemon starts after restart and `mg status` reflects a working server and client on each platform.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, devops, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.