From d6c3cfdbd39aa5914e742162170bfb5451298ca3 Mon Sep 17 00:00:00 2001 From: Alexandre CATTEAU Date: Fri, 16 Sep 2022 15:07:51 +0200 Subject: [PATCH] Fix few errors in install script --- install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 67a68de..34df2e2 100755 --- a/install.sh +++ b/install.sh @@ -19,11 +19,15 @@ fi echo "Copying Systemd units to system directory..." if [ ! -f /etc/ssl/cert.crt ]; then - openssl req -newkey rsa:4096 -x509 -sha256 -days 999 -nodes -out /etc/ssl/cert.crt -keyout /etc/ssl/cert.key \ + $sudo openssl req -newkey rsa:4096 -x509 -sha256 -days 999 -nodes -out /etc/ssl/cert.crt -keyout /etc/ssl/cert.key \ -subj "/C=/ST=/L=/O=/OU=/CN=" fi +if [ -d /etc/nginx ]; then + $sudo cp $run_directory/nginx-blocks/0-http-redirect /etc/nginx/sites-available/0-http-redirect + $sudo ln -s ../sites-available/0-http-redirect /etc/nginx/sites-enabled/0-http-redirect +fi -if [ "$file_browser" = "yes" ]; then +if [ "$filebrowser" = "yes" ]; then $sudo cp $run_directory/systemd-templates/filebrowser.service /etc/systemd/system/ $sudo sed -i -e "s/PH_NAS_USER/$nas_user/g" /etc/systemd/system/filebrowser.service $sudo sed -i -e "s/PH_NAS_DIRECTORY/$nas_location/g" /etc/systemd/system/filebrowser.service