Skip to content

Commit

Permalink
Run create_certs.sh only one time to avoid problem when someone tries…
Browse files Browse the repository at this point in the history
… to run the image.
  • Loading branch information
edwaraco committed Sep 8, 2017
1 parent 23038b4 commit 4ba3af3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion move_and_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,11 @@
cp -a /prosody/etc/* /etc/prosody/
cp -a /prosody/modules/ /usr/lib/prosody/modules/
chmod a+x /prosody/scripts/*.sh
/prosody/scripts/create_cert.sh && /prosody/scripts/create_user.sh && /usr/bin/supervisord
if [ -e /prosody/scripts/create_cert.txt ]
then
/prosody/scripts/create_user.sh && /usr/bin/supervisord
else
echo "Creating certs..."
echo "created!" > /prosody/scripts/create_cert.txt
/prosody/scripts/create_cert.sh && /prosody/scripts/create_user.sh && /usr/bin/supervisord
fi

0 comments on commit 4ba3af3

Please sign in to comment.