Open scruzin opened 4 months ago
Perhaps adding a path that looks like
dl/<device type>/init/<version>/pkg.json
Could also allow these components to only be update rarely when we make a change rather being included in every package, this way as well, a device only needs to visit the init directory once.
How would the upgrader know if it has performed the command once already, and not do the command every time on startup?
The upgrader keeps a record of the last package it installed under /opt/ausocean/data.
That being said, if the checksum is unchanged it won't do it again.
Perhaps adding a path that looks like
dl/<device type>/init/<version>/pkg.json
Could also allow these components to only be update rarely when we make a change rather being included in every package, this way as well, a device only needs to visit the init directory once.
Yes, I thought about having a separate package just for init
, but I think having a single package is preferable. I'll give it some more thought, though.
BTW, the cmd
functionality for executing shell commands from the upgrader is already supported.
At present, it is necessary to manually run make in
av/init
to install AusOcean software and required services.It is proposed to have the upgrader do this instead in order to eliminate the need to log into new devices.
A new
init
bool syntax inpkg.json
would identify components that need only be installed once and/or commands that only need to be run once.For example, to install and enable the
rv.service
: