Skip to content

Instantly share code, notes, and snippets.

@xynova
Last active August 20, 2017 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xynova/3313ad67e81e523088f0473385e96a87 to your computer and use it in GitHub Desktop.
Save xynova/3313ad67e81e523088f0473385e96a87 to your computer and use it in GitHub Desktop.
App-Services base setup
#!/bin/sh
set -ebm
setup_ssh() {
echo "Create App Services root password"
echo "root:Docker!" | chpasswd
echo "Create ssh host keys"
ssh-keygen -A
echo "Start ssh server"
/usr/sbin/sshd
}
start_app(){
echo "the app starts"
exec http-echo
}
# only start ssh when necessary
echo $ENABLE_SSH | grep -qi true && setup_ssh
start_app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment