Skip to content

Commit

Permalink
Start LIRCd on system startup
Browse files Browse the repository at this point in the history
  • Loading branch information
Cellane committed May 19, 2024
1 parent 8b15a8d commit 14d4d73
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/minetti_fw/application.ex
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,18 @@ defmodule MinettiFw.Application do
# {MinettiFw.Worker, arg},
] ++ children(target())

prepare_system(target())

Supervisor.start_link(children, opts)
end

def prepare_system(:host) do
end

def prepare_system(_target) do
File.mkdir_p("/var/run/lirc")
end

# List all child processes to be supervised
def children(:host) do
[
Expand All @@ -35,6 +44,7 @@ defmodule MinettiFw.Application do
# Children for all targets except host
# Starts a worker by calling: MinettiFw.Worker.start_link(arg)
# {MinettiFw.Worker, arg},
{MuonTrap.Daemon, ["lircd", ["--nodaemon"]]}
]
end

Expand Down

0 comments on commit 14d4d73

Please sign in to comment.