Add WARNING and finish install script
This commit is contained in:
parent
43699b8460
commit
981caad97e
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
run_directory=$(dirname "$0")
|
run_directory=$(dirname "$0")
|
||||||
|
|
||||||
|
# WARNING Unlike our usual install scripts, this one should NEVER be run unattended;
|
||||||
|
# Make sure to create .disabled file.
|
||||||
if [ -f $run_directory/.disabled ]; then
|
if [ -f $run_directory/.disabled ]; then
|
||||||
echo "Installation is disabled. Exiting..."
|
echo "Installation is disabled. Exiting..."
|
||||||
exit 0
|
exit 0
|
||||||
@ -15,7 +17,7 @@ fi
|
|||||||
|
|
||||||
echo "Copying Systemd units and drop-ins to system directory..."
|
echo "Copying Systemd units and drop-ins to system directory..."
|
||||||
$sudo cp $run_directory/etc-letsencrypt.mount /etc/systemd/system/
|
$sudo cp $run_directory/etc-letsencrypt.mount /etc/systemd/system/
|
||||||
if [ ! -d /etc/systemd/system/nginx.service.d ]; then # TODO
|
if [ ! -d /etc/systemd/system/nginx.service.d ]; then
|
||||||
$sudo mkdir /etc/systemd/system/nginx.service.d
|
$sudo mkdir /etc/systemd/system/nginx.service.d
|
||||||
fi
|
fi
|
||||||
$sudo cp $run_directory/start-lighttpd.conf /etc/systemd/system/nginx.service.d/
|
$sudo cp $run_directory/start-lighttpd.conf /etc/systemd/system/nginx.service.d/
|
||||||
@ -27,11 +29,10 @@ $sudo rm /etc/lighttpd/conf-enabled/*
|
|||||||
$sudo ln -s /etc/lighttpd/conf-available/10-proxy.conf /etc/lighttpd/conf-enabled/
|
$sudo ln -s /etc/lighttpd/conf-available/10-proxy.conf /etc/lighttpd/conf-enabled/
|
||||||
$sudo ln -s /etc/lighttpd/conf-available/10-ssl.conf /etc/lighttpd/conf-enabled/
|
$sudo ln -s /etc/lighttpd/conf-available/10-ssl.conf /etc/lighttpd/conf-enabled/
|
||||||
$sudo ln -s /etc/lighttpd/conf-available/99-webssh.conf /etc/lighttpd/conf-enabled/
|
$sudo ln -s /etc/lighttpd/conf-available/99-webssh.conf /etc/lighttpd/conf-enabled/
|
||||||
if [ ! -f /etc/lighttpd/server.pem ]; then # TODO
|
if [ ! -f /etc/lighttpd/server.pem ]; then
|
||||||
echo "Creating an SSL certificate for lighttpd:"
|
echo "Creating an SSL certificate for lighttpd:"
|
||||||
$sudo openssl req -newkey rsa:4096 -x509 -sha256 -days 999 -nodes -out /etc/lighttpd/server.pem -keyout \
|
$sudo openssl req -newkey rsa:4096 -x509 -sha256 -days 999 -nodes -out /etc/lighttpd/server.pem -keyout \
|
||||||
/etc/lighttpd/server.pem -subj "/C=/ST=/L=/O=/OU=/CN=" # is it the right way?
|
/etc/lighttpd/server.pem -subj "/C=/ST=/L=/O=/OU=/CN="
|
||||||
#$sudo chmod o+r /etc/lighttpd/server.pem # needed?
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Reloading Systemd..."
|
echo "Reloading Systemd..."
|
||||||
|
Reference in New Issue
Block a user