Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/289.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Certbot通过shell脚本自动运行?_Php_Python_Amazon Web Services_Ssl_Server - Fatal编程技术网

Php Certbot通过shell脚本自动运行?

Php Certbot通过shell脚本自动运行?,php,python,amazon-web-services,ssl,server,Php,Python,Amazon Web Services,Ssl,Server,我的目标是在只写文件夹名称的情况下动态创建一个shell脚本,现在我已经做到了这一点。挑战是要确保它的安全性。我让certbot自动运行,这需要在手动点击它时执行某些操作,但我需要通过shell脚本这样做: #!/bin/bash # My first script /*****MY SITE CREATION SCRIPT*****/ a2ensite $1.work sleep 2 certbot-auto /*CAN WE DO THIS IN JUST ONE GO*/ echo

我的目标是在只写文件夹名称的情况下动态创建一个shell脚本,现在我已经做到了这一点。挑战是要确保它的安全性。我让certbot自动运行,这需要在手动点击它时执行某些操作,但我需要通过shell脚本这样做:

#!/bin/bash
# My first script
/*****MY SITE CREATION SCRIPT*****/

a2ensite $1.work

sleep 2

certbot-auto /*CAN WE DO THIS IN JUST ONE GO*/

echo $1.' site enabled - certbot running'

我读取$1.work变量并使用mkdir commnad创建目录

mkdir  $1.work   
cd $1.work

为什么需要此certbot还提供创建目录和自动续订


我建议参考此

谢谢您的时间,但我需要在上面安装ssl,我已经完成了目录设置等工作。,只是想知道,在要求输入参数时,我们是否可以通过任何方式运行certbot auto命令,而无需任何其他交互方式。sudo certbot renew--干运行使用此命令请提供您想要运行的命令的全部详细信息。