MacOS works now
This commit is contained in:
parent
8ee712e81a
commit
30dda02cc4
@ -378,12 +378,16 @@ do_gajudesk() ->
|
||||
GajuDesk = "zx run gajudesk",
|
||||
Command =
|
||||
case os:type() of
|
||||
{unix, _} -> detach_unix(GajuDesk);
|
||||
{win32, nt} -> detach_windows(GajuDesk)
|
||||
{unix, darwin} -> detach_darwin(GajuDesk);
|
||||
{unix, _} -> detach_unix(GajuDesk);
|
||||
{win32, nt} -> detach_windows(GajuDesk)
|
||||
end,
|
||||
Out = os:cmd(Command),
|
||||
log(info, "os:cmd(~s) -> ~s", [Command, Out]).
|
||||
|
||||
detach_darwin(Command) ->
|
||||
"nohup " ++ Command ++ " >/dev/null 2>&1 & disown".
|
||||
|
||||
detach_unix(Command) ->
|
||||
"setsid sh -c 'exec nohup " ++ Command ++ " >/dev/null 2>&1' &".
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user