Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Commit

Permalink
fix auto ssl by hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
noogen committed Oct 27, 2018
1 parent c6cbc6f commit d09baa2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
7 changes: 2 additions & 5 deletions rootfs/etc/my_init.d/startup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

# save HOSTNAME
export XHOSTNAME="$HOSTNAME"
export TERM=xterm
MYPASS=

Expand Down Expand Up @@ -57,9 +55,8 @@ fi

# auto ssl on start
if [ -f /bin/vesta-auto-ssl.sh ]; then
echo "[i] running /bin/vesta-auto-ssl.sh"
export HOSTNAME="$XHOSTNAME"
bash /bin/vesta-auto-ssl.sh
echo "[i] running /bin/vesta-auto-ssl.sh"
bash /bin/vesta-auto-ssl.sh
fi

if [ ! -z "$MYPASS" ]; then
Expand Down
3 changes: 1 addition & 2 deletions rootfs/sysprepz/admin/bin/vesta-auto-ssl.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#!/bin/bash

domain="$HOSTNAME"

# get environment variables
source /etc/container_environment.sh

VESTA_PATH='/usr/local/vesta'
domain=`/bin/hostname --fqdn`
user='admin'

# only run if hostname is valid, regex check if it has a period
Expand Down

0 comments on commit d09baa2

Please sign in to comment.