Skip to content

Commit

Permalink
Update entrypoint.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
SiwatS authored Mar 31, 2022
1 parent ec17d87 commit 74bf68c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
#Start Unit
unitd --no-daemon --control unix:/var/run/control-unit.sock &

Expand All @@ -13,10 +14,8 @@ cat /etc/letsencrypt/live/$DOMAIN_NAME/privkey.pem >> fullcert.pem &&
curl -X PUT --data-binary @fullcert.pem --unix-socket /var/run/control-unit.sock http://localhost/certificates/primary &&

#Apply SSL Partial Configuration
curl -X PUT --data-binary @/software/listener.json --unix-socket /var/run/control-unit.sock 'http://localhost/config/listener/%2A%3A443' &&
curl -X PUT --data-binary @/software/listener.json --unix-socket /var/run/control-unit.sock 'http://localhost/config/listeners/%2A%3A443' &&

#Idle Forever (IDK why tail -f /dev/null doesn't work so using infinite loop instead.)
while true
do
sleep 1
done
#If you use other base image other than minimal, tail might work.
while :; do; sleep 1; done

0 comments on commit 74bf68c

Please sign in to comment.