Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't delete the working dir for config changes #1

Open
kmccloud opened this issue Jan 15, 2021 · 0 comments
Open

Don't delete the working dir for config changes #1

kmccloud opened this issue Jan 15, 2021 · 0 comments

Comments

@kmccloud
Copy link

kmccloud commented Jan 15, 2021

Currently, when there is a docker container start event the script /generateConfig.sh is ran.
The "init" method deletes the CONFIG_DIR.
We copy our id_rsa and authorized files to this directory when a container starts thus they get removed by generateConfig.sh.
Also, if we have several containers running, one for each user that might try to ssh in, their keys get deleted too.

If the generateConfig.sh script were change to simply remove he sshpiper_upstream files, it will recreate them in the parseConfig method.

    init() {
      # Remove existing configuration
      rm -rf ${CONFIG_DIR}/*/sshpiper_upstream
      # Ensure configuration folder exists
      mkdir -p ${CONFIG_DIR}
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant