Intial Commit
This commit is contained in:
22
preconf.sh
Normal file
22
preconf.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
###Fetch Config
|
||||
mrepo=https://git.ictmaatwerk.com/VPS-scripts/AcmeSH
|
||||
mbranch=main
|
||||
|
||||
if [ -z ${email+x} ]; then echo 'Error $email is not set' ; fi
|
||||
|
||||
mkdir -p /opt/acmesh /etc/acmesh/data /etc/acmesh/certs
|
||||
curl -s https://codeload.github.com/acmesh-official/acme.sh/tar.gz/master -o /tmp/acmesh.tar.gz
|
||||
tar -zxf /tmp/acmesh.tar.gz -C /opt/acmesh --strip-components=1
|
||||
|
||||
curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/conf/account.conf -o /etc/acmesh/data/account.conf
|
||||
curl --retry 7 --retry-delay 5 -s "$mrepo"/raw/branch/"$mbranch"/conf/acme.sh.env -o /opt/acmesh/acme.sh.env
|
||||
echo '. "/opt/acmesh/acme.sh.env"' >> ~/.bashrc
|
||||
echo '42 0 * * * root "/opt/acmesh/acme.sh" --cron --home "/opt/acmesh/" --config-home "/etc/acmesh/data" > /dev/null' >> /etc/crontab
|
||||
|
||||
openssl dhparam -out /etc/acmesh/certs/ssl-dhparams.pem 4096
|
||||
#openssl dhparam -out /etc/acmesh/certs/ssl-dhparams.pem 2048 #use for quick generation, only for testing
|
||||
|
||||
/opt/acmesh/acme.sh --home "/opt/acmesh/" --config-home "/etc/acmesh/data" --upgrade
|
||||
/opt/acmesh/acme.sh --config-home "/etc/acmesh/data" --register-account
|
||||
/opt/acmesh/acme.sh --config-home "/etc/acmesh/data" --update-account --accountemail "$email"
|
||||
|
||||
Reference in New Issue
Block a user