mirror of
https://codeberg.org/ashley/poke.git
synced 2025-06-08 09:33:02 -04:00
Move files
This commit is contained in:
parent
7f08eff2a2
commit
c46f64c3b1
3 changed files with 6 additions and 7 deletions
30
entrypoint.sh
Normal file
30
entrypoint.sh
Normal file
|
@ -0,0 +1,30 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ "$STAGING" == true ]]; then
|
||||
TEST="--test-cert"
|
||||
echo Using staging server!
|
||||
else
|
||||
TEST=""
|
||||
echo Using production server!
|
||||
fi
|
||||
|
||||
if [[ -v "HOSTNAME" && -v "EMAIL" ]]; then
|
||||
echo Creating nginx config...
|
||||
sed -i "s/SERVERNAME/$HOSTNAME/" /etc/nginx/conf.d/poketube.conf
|
||||
echo Starting certbot
|
||||
certbot run --nginx -n \
|
||||
-d $HOSTNAME \
|
||||
-d www.$HOSTNAME --agree-tos \
|
||||
--email $EMAIL \
|
||||
$TEST
|
||||
echo Starting nginx
|
||||
nginx -s reload
|
||||
|
||||
else
|
||||
echo Please set HOSTNAME and/or EMAIL!
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec "$@"
|
Loading…
Add table
Add a link
Reference in a new issue