SSH keys related logging
This commit is contained in:
parent
4a4da2c080
commit
e9fb6a6b46
@ -244,7 +244,9 @@ func (p *Processor) Create(appTemplate apps.App) error {
|
||||
time.Sleep(5 * time.Second) // We wait for a little bit longer to make sure the container is fully started
|
||||
|
||||
// Setup SSH keys if it's noted in the request
|
||||
log.Println("Checking if SSH key is required")
|
||||
if len(appTemplate.Setup.SSHKeys) > 0 && len(appTemplate.Snapshot) == 0 {
|
||||
log.Println("Setting up SSH keys")
|
||||
err = p.UpdateKeys(appTemplate.Setup.SSHKeys)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to update keys: %v", err)
|
||||
@ -456,6 +458,7 @@ func (p *Processor) UpdateKeys(keys string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
log.Println("Storing keys into " + sshPubKeysLocation)
|
||||
err = container.AppendFile(sshPubKeysLocation, keys+"\n", "0600")
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user