Skip to content

Commit

Permalink
Chasing weird bash scripting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nebhead committed Apr 22, 2022
1 parent 3657a74 commit df8206c
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions auto-install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

# Speaker-Select Installation Script
# Many thanks to the PiVPN project (pivpn.io) for much of the inspiration for this script
# Run from https://raw.githubusercontent.com/nebhead/spkr-select/master/auto-install/install.sh
# Run from https://raw.githubusercontent.com/nebhead/spkr-select-v3/master/auto-install/install.sh
#
# Install with this command (from your Pi):
#
# curl https://raw.githubusercontent.com/nebhead/spkr-select/master/auto-install/install.sh | bash
# curl https://raw.githubusercontent.com/nebhead/spkr-select-v3/master/auto-install/install.sh | bash
#
# WARNING: Do NOT run with SUDO or the cd commands will not work properly (i.e. they will use root
# instead of the pi user). This command will automatically get SUDO and use in the proper places.
Expand Down Expand Up @@ -109,15 +109,19 @@ cd /usr/local/bin/spkr-select-v3/certs
#$SUDO nano localhost.conf

# Create public and private key pairs based on localhost.conf information
echo " - Running OpenSSL to generate key pairs"
#echo " - Running OpenSSL to generate key pairs"
#$SUDO openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout localhost.key -out localhost.crt -config localhost.conf
$SUDO openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout localhost.key -out localhost.crt
#$SUDO openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout localhost.key -out localhost.crt

echo " - Move certs to /etc/ssl"
#echo " - Move certs to /etc/ssl"
# Move the public key to the /etc/ssl/certs directory
$SUDO mv localhost.crt /etc/ssl/certs/localhost.crt
#$SUDO mv localhost.crt /etc/ssl/certs/localhost.crt
# Move the private key to the /etc/ssl/private directory
$SUDO mv localhost.key /etc/ssl/private/localhost.key
#$SUDO mv localhost.key /etc/ssl/private/localhost.key

# Generate certs
$SUDO bash -i generate.sh

# Restart nginx
echo " - Restart nginx webserver"
$SUDO service nginx restart
Expand Down

0 comments on commit df8206c

Please sign in to comment.