Running Script results in Syntax error - deploy_freenas.py: 28: Syntax error: word unexpected (expecting ")")
Closed this issue · 2 comments
Hi, I have been trying to setup this script on truenas 12.0-U3 and I keep getting this error
root@Certbot:/scripts/deploy-freenas # sh deploy_freenas.py
deploy_freenas.py:
Import and activate a SSL/TLS certificate into FreeNAS 11.1 or later
Uses the FreeNAS API to make the change, so everything's properly saved in the config
database and captured in a backup.
Requires paths to the cert (including the any intermediate CA certs) and private key,
and username, password, and FQDN of your FreeNAS system.
Your private key should only be readable by root, so this script must run with root
privileges. And, since it contains your root password, this script itself should
only be readable by root.
Source: https://github.com/danb35/deploy-freenas
: not found
deploy_freenas.py: import: not found
deploy_freenas.py: import: not found
deploy_freenas.py: import: not found
deploy_freenas.py: import: not found
deploy_freenas.py: import: not found
deploy_freenas.py: import: not found
deploy_freenas.py: import: not found
deploy_freenas.py: import: not found
from: can't read /var/mail/datetime
from: can't read /var/mail/urllib3.exceptions
deploy_freenas.py: 28: Syntax error: word unexpected (expecting ")")
Try running the script with python3
instead of sh
.
Alternatively, run chmod 700 deploy_freenas.py
, then ./deploy_freenas.py
.