Last active
August 20, 2017 08:57
-
-
Save xynova/3313ad67e81e523088f0473385e96a87 to your computer and use it in GitHub Desktop.
App-Services base setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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