Skip to content

Commit d394b1e

Browse files
author
Kristan Kenney
authored
Merge pull request hestiacp#1753 from jaapmarcus/feature/le-on-install
Lets Encrypt on install
2 parents be9a4b9 + db0fa3a commit d394b1e

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

bin/v-add-letsencrypt-host

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@
1313
# Variable&Function #
1414
#----------------------------------------------------------#
1515

16+
# make sure path is always loaded
17+
source /etc/profile
18+
1619
# Argument definition
17-
domain=$HOSTNAME
20+
domain=$(hostname -f);
21+
if [ -z $domain ]; then
22+
domain=$HOSTNAME;
23+
fi
1824
user="$($HESTIA/bin/v-search-domain-owner "$domain" web)"
1925
[[ -z "$user" ]] && user="admin"
2026

install/hst-install-debian.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1847,6 +1847,9 @@ chown admin:admin $HESTIA/data/sessions
18471847
mkdir -p /backup/
18481848
chmod 755 /backup/
18491849

1850+
# create cronjob to generate ssl
1851+
echo "@reboot root sleep 10 && rm /etc/cron.d/hestia-ssl && /usr/local/hestia/bin/v-add-letsencrypt-host" > /etc/cron.d/hestia-ssl
1852+
18501853
#----------------------------------------------------------#
18511854
# Configure File Manager #
18521855
#----------------------------------------------------------#
@@ -1914,19 +1917,16 @@ rm -f $tmpfile
19141917
# Add welcome message to notification panel
19151918
$HESTIA/bin/v-add-user-notification admin 'Welcome to Hestia Control Panel!' '<br>You are now ready to begin <a href="/add/user/">adding user accounts</a> and <a href="/add/web/">domains</a>. For help and assistance, view the <a href="https://docs.hestiacp.com/" target="_new">documentation</a> or visit our <a href="https://forum.hestiacp.com/" target="_new">user forum</a>.<br><br>Please report any bugs or issues via <a href="https://github.com/hestiacp/hestiacp/issues" target="_new"><i class="fab fa-github"></i> GitHub</a>.<br><br><b>Have a wonderful day!</b><br><br><i class="fas fa-heart status-icon red"></i> The Hestia Control Panel development team'
19161919

1917-
echo "[ ! ] IMPORTANT: You must logout or restart the server before continuing."
1920+
echo "[ ! ] IMPORTANT: System will reboot"
19181921
echo ""
19191922
if [ "$interactive" = 'yes' ]; then
1920-
echo -n " Do you want to reboot now? [Y/N] "
1923+
echo -n " Press any key to continue!"
19211924
read reboot
1922-
1923-
if [ "$reboot" = "Y" ] || [ "$reboot" = "y" ]; then
1924-
reboot
1925-
fi
19261925
fi
19271926

19281927
# Clean-up
19291928
# Sort final configuration file
19301929
sort_config_file
19311930

1931+
reboot
19321932
# EOF

install/hst-install-ubuntu.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,6 +1882,8 @@ chmod 755 /backup/
18821882
echo "[ * ] Configuring File Manager..."
18831883
$HESTIA/bin/v-add-sys-filemanager quiet
18841884

1885+
# create cronjob to generate ssl
1886+
echo "@reboot root sleep 10 && rm /etc/cron.d/hestia-ssl && /usr/local/hestia/bin/v-add-letsencrypt-host" > /etc/cron.d/hestia-ssl
18851887

18861888
#----------------------------------------------------------#
18871889
# Hestia Access Info #
@@ -1942,19 +1944,16 @@ rm -f $tmpfile
19421944
# Add welcome message to notification panel
19431945
$HESTIA/bin/v-add-user-notification admin 'Welcome to Hestia Control Panel!' '<br>You are now ready to begin <a href="/add/user/">adding user accounts</a> and <a href="/add/web/">domains</a>. For help and assistance, view the <a href="https://docs.hestiacp.com/" target="_new">documentation</a> or visit our <a href="https://forum.hestiacp.com/" target="_new">user forum</a>.<br><br>Please report any bugs or issues via <a href="https://github.com/hestiacp/hestiacp/issues" target="_new"><i class="fab fa-github"></i> GitHub</a>.<br><br><b>Have a wonderful day!</b><br><br><i class="fas fa-heart status-icon red"></i> The Hestia Control Panel development team'
19441946

1945-
echo "[ ! ] IMPORTANT: You must logout or restart the server before continuing."
1947+
echo "[ ! ] IMPORTANT: System will reboot"
19461948
echo ""
19471949
if [ "$interactive" = 'yes' ]; then
1948-
echo -n " Do you want to reboot now? [Y/N] "
1950+
echo -n " Press any key to continue!"
19491951
read reboot
1950-
1951-
if [ "$reboot" = "Y" ] || [ "$reboot" = "y" ]; then
1952-
reboot
1953-
fi
19541952
fi
19551953

19561954
# Clean-up
19571955
# Sort final configuration file
19581956
sort_config_file
19591957

1958+
reboot
19601959
# EOF

0 commit comments

Comments
 (0)