#!/usr/bin/env bash run_directory=$(dirname "$0") if [ -f $run_directory/.disabled ]; then echo "Installation is disabled. Exiting..." exit 0 fi echo "Copying Systemd units and drop-ins to system directory..." # TODO echo "Setting up lighttpd..." sudo cp $run_directory/lighttpd-webssh.conf /etc/lighttpd/conf-available/99-webssh.conf 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-ssl.conf /etc/lighttpd/conf-enabled/ sudo ln -s /etc/lighttpd/conf-available/99-webssh.conf /etc/lighttpd/conf-enabled/ if not server.pem; then # TODO echo "Creating an SSL certificate for lighttpd:" create it # TODO fi echo "Reloading Systemd..." sudo systemctl daemon-reload echo "Disabling nginx and enabling lighttpd..." sudo systemctl disable nginx sudo systemctl enable lighttpd echo "Finished install. Exiting..." echo "NOTE: Neither nginx nor lighttpd were started/stopped." exit 0