Compare commits
No commits in common. "e9af069d86d20ea7e3278eb2b043cd82db37a22f" and "7153dcae2c38250283d5a7aa161abc82ca3f9e84" have entirely different histories.
e9af069d86
...
7153dcae2c
|
@ -1,99 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
CAPASS="passwordca"
|
|
||||||
SVPASS="passwordsv"
|
|
||||||
|
|
||||||
# このスクリプトはexpectコマンドを使用しています。
|
|
||||||
# インストールしてから使ってください。
|
|
||||||
# sudo apt -y install expect
|
|
||||||
|
|
||||||
expect <<EOF
|
|
||||||
set timeout -1
|
|
||||||
spawn ./01-setup.sh
|
|
||||||
|
|
||||||
expect -re {\[sudo\] password for .*:} {
|
|
||||||
stty -echo
|
|
||||||
interact -u tty_spawn_id -o "\r" return
|
|
||||||
stty echo
|
|
||||||
}
|
|
||||||
|
|
||||||
expect -re {CA certificate filename \(or enter to create\)}
|
|
||||||
send \r
|
|
||||||
expect -re {Enter PEM pass phrase:}
|
|
||||||
send ${CAPASS}\r
|
|
||||||
expect -re {Verifying - Enter PEM pass phrase:}
|
|
||||||
send ${CAPASS}\r
|
|
||||||
expect -re {Country Name \(2 letter code\) \[JA\]:}
|
|
||||||
send \r
|
|
||||||
expect -re {State or Province Name \(full name\)}
|
|
||||||
send \r
|
|
||||||
expect -re {Locality Name \(eg, city\) \[Chiyoda\]:}
|
|
||||||
send \r
|
|
||||||
expect -re {Organization Name \(eg, company\) \[Example Networks Inc\.\]:}
|
|
||||||
send \r
|
|
||||||
expect -re {Organizational Unit Name \(eg, section\) \[\]:}
|
|
||||||
send \r
|
|
||||||
expect -re {Common Name \(e\.g\. server FQDN or YOUR name\) \[example\.net\]:}
|
|
||||||
send \r
|
|
||||||
expect -re {Email Address \[webmaster@example\.net\]:}
|
|
||||||
send \r
|
|
||||||
expect -re {A challenge password \[\]:}
|
|
||||||
send \r
|
|
||||||
expect -re {An optional company name \[\]:}
|
|
||||||
send \r
|
|
||||||
expect -re {Enter pass phrase for .*/cakey\.pem:}
|
|
||||||
send ${CAPASS}\r
|
|
||||||
|
|
||||||
expect -re {Enter PEM pass phrase:}
|
|
||||||
send ${SVPASS}\r
|
|
||||||
expect -re {Verifying - Enter PEM pass phrase:}
|
|
||||||
send ${SVPASS}\r
|
|
||||||
expect -re {Country Name \(2 letter code\) \[JA\]:}
|
|
||||||
send \r
|
|
||||||
expect -re {State or Province Name \(full name\) \[Tokyo\]:}
|
|
||||||
send \r
|
|
||||||
expect -re {Locality Name \(eg, city\) \[Chiyoda\]:}
|
|
||||||
send \r
|
|
||||||
expect -re {Organization Name \(eg, company\) \[Example Networks Inc\.\]:}
|
|
||||||
send \r
|
|
||||||
expect -re {Organizational Unit Name \(eg, section\) \[\]:}
|
|
||||||
send \r
|
|
||||||
expect -re {Common Name \(e\.g\. server FQDN or YOUR name\) \[example\.net\]:}
|
|
||||||
send \r
|
|
||||||
expect -re {Email Address \[webmaster@example\.net\]:}
|
|
||||||
send \r
|
|
||||||
expect -re {A challenge password \[\]:}
|
|
||||||
send \r
|
|
||||||
expect -re {An optional company name \[\]:}
|
|
||||||
send \r
|
|
||||||
|
|
||||||
expect -re {Enter pass phrase for .*/cakey\.pem:}
|
|
||||||
send ${CAPASS}\r
|
|
||||||
|
|
||||||
expect -re {Sign the certificate\? \[y/n\]:}
|
|
||||||
send y\r
|
|
||||||
expect -re {1 out of 1 certificate requests certified, commit\? \[y/n\]}
|
|
||||||
send y\r
|
|
||||||
|
|
||||||
expect -re {Enter pass phrase for newkey\.pem:}
|
|
||||||
send ${SVPASS}\r
|
|
||||||
|
|
||||||
expect -re {Enter passphrase \(empty for no passphrase\):}
|
|
||||||
send \r
|
|
||||||
expect -re {Enter same passphrase again:}
|
|
||||||
send \r
|
|
||||||
|
|
||||||
expect -re {Enter passphrase \(empty for no passphrase\):}
|
|
||||||
send \r
|
|
||||||
expect -re {Enter same passphrase again:}
|
|
||||||
send \r
|
|
||||||
|
|
||||||
expect -re {コピーが終わったらEnterキーを押してください。} {
|
|
||||||
interact -u tty_spawn_id -o "\r" return
|
|
||||||
}
|
|
||||||
|
|
||||||
expect -re {IPアドレス:} {
|
|
||||||
interact -u tty_spawn_id -o "\r" return
|
|
||||||
}
|
|
||||||
|
|
||||||
expect eof
|
|
||||||
EOF
|
|
|
@ -94,7 +94,7 @@ sudo a2ensite example.net gitea kopano test
|
||||||
[ ! -d /var/www/test ] && sudo mkdir /var/www/test && sudo chown $(whoami):$(whoami) /var/www/test
|
[ ! -d /var/www/test ] && sudo mkdir /var/www/test && sudo chown $(whoami):$(whoami) /var/www/test
|
||||||
|
|
||||||
secho 3 "=== モジュールの有効化"
|
secho 3 "=== モジュールの有効化"
|
||||||
sudo a2enmod ssl rewrite proxy_http headers http2
|
sudo a2enmod ssl rewrite proxy_http headers
|
||||||
|
|
||||||
secho 3 "=== 警告を止める設定"
|
secho 3 "=== 警告を止める設定"
|
||||||
echo "ServerName localhost" | sudo tee /etc/apache2/conf-available/fqdn.conf > /dev/null
|
echo "ServerName localhost" | sudo tee /etc/apache2/conf-available/fqdn.conf > /dev/null
|
||||||
|
@ -222,5 +222,4 @@ echo "================================================"
|
||||||
echo "8" > $SCRIPTHOME/.setupphase.txt
|
echo "8" > $SCRIPTHOME/.setupphase.txt
|
||||||
|
|
||||||
secho 3 "=== セットアップ完了"
|
secho 3 "=== セットアップ完了"
|
||||||
echo "rmvコマンドが正しく動作するように、一度端末を開き直してください"
|
|
||||||
exit
|
exit
|
||||||
|
|
Loading…
Reference in New Issue