Add local.settings.php to every instance

This commit adds a new file 'local.settings.php' to each distillery
instance. This file can be used to automatically edit global distillery
settings.
This commit is contained in:
Tom Wiesing 2024-04-01 16:41:11 +02:00
parent 6eab3ac311
commit 24ff81f7cd
No known key found for this signature in database
13 changed files with 98 additions and 42 deletions

View file

@ -30,19 +30,11 @@ func (*Rebuild) Action() InstanceAction {
}
func (r *Rebuild) Act(ctx context.Context, instance *wisski.WissKI, in io.Reader, out io.Writer, params ...string) error {
// read the flags of the instance to be provisioned
// read the flags of the instance to be rebuilt
var system models.System
if err := json.Unmarshal([]byte(params[0]), &system); err != nil {
return err
}
smanager := instance.SystemManager()
if err := smanager.Apply(ctx, out, system, true); err != nil {
return err
}
if err := smanager.RebuildSettings(ctx, out); err != nil {
return err
}
return nil
return instance.SystemManager().Apply(ctx, out, system)
}