mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
core183: generate new rsa before apache start
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
@@ -119,15 +119,6 @@ ldconfig
|
||||
chmod -v 750 /etc/sudoers.d
|
||||
chmod -v 640 /etc/sudoers.d/*
|
||||
|
||||
# Start services
|
||||
/etc/rc.d/init.d/apache start
|
||||
if grep -q "ENABLE_SSH=on" /var/ipfire/remote/settings; then
|
||||
/etc/init.d/sshd start
|
||||
fi
|
||||
if grep -q "ENABLED=on" /var/ipfire/vpn/settings; then
|
||||
/etc/rc.d/init.d/ipsec start
|
||||
fi
|
||||
|
||||
# Check apache rsa key and replace if it is too small
|
||||
KEYSIZE=$(openssl rsa -in /etc/httpd/server.key -text -noout | sed -n 's/Private-Key:\ (\(.*\)\ bit.*/\1/p')
|
||||
if [ $KEYSIZE \< 2048 ]; then
|
||||
@@ -143,6 +134,16 @@ if [ $KEYSIZE \< 2048 ]; then
|
||||
-out /etc/httpd/server.crt &>/dev/null
|
||||
fi
|
||||
|
||||
# Start services
|
||||
/etc/rc.d/init.d/apache start
|
||||
if grep -q "ENABLE_SSH=on" /var/ipfire/remote/settings; then
|
||||
/etc/init.d/sshd start
|
||||
fi
|
||||
if grep -q "ENABLED=on" /var/ipfire/vpn/settings; then
|
||||
/etc/rc.d/init.d/ipsec start
|
||||
fi
|
||||
|
||||
|
||||
# Rebuild initial ramdisks
|
||||
dracut --regenerate-all --force
|
||||
KVER="xxxKVERxxx"
|
||||
|
||||
Reference in New Issue
Block a user