sean-rabbitt / letsEncryptJSS

Let's Encrypt for JSS (JAMF Software Server)
29 stars 4 forks source link

Script Exits at Unable to find (existing) Keystore #9

Closed htheriault closed 5 years ago

htheriault commented 5 years ago

Hi,

Running script on Centos, with a functioning JSS instance. Script exits when it's unable to see the keystore.

$ sudo bash letsEncrypt.sh /bin/git Fri Jan 25 20:06:42: git installed /bin/java Fri Jan 25 20:06:42: java installed /bin/keytool Fri Jan 25 20:06:42: keytool installed /bin/openssl Fri Jan 25 20:06:42: openssl installed Fri Jan 25 20:06:42: Unable to find the JSS keystore at usr. Exiting script!

Manually ran the sed commands in the top of the logic section, and it returns the correct path.

htheriault commented 5 years ago

Replacing the full path instead of the variable works until here. It seems that tomcat instance name is is the issue? It does match though...

Complete! Creating virtual environment... Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/virtualenv.py", line 2327, in main() File "/usr/lib/python2.7/site-packages/virtualenv.py", line 712, in main symlink=options.symlink) File "/usr/lib/python2.7/site-packages/virtualenv.py", line 944, in create_environment download=download, File "/usr/lib/python2.7/site-packages/virtualenv.py", line 900, in install_wheel call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT) File "/usr/lib/python2.7/site-packages/virtualenv.py", line 796, in call_subprocess % (cmd_desc, proc.returncode)) OSError: Command /opt/eff.org/certbot/venv/bin/python2.7 - setuptools pip wheel failed with error code 1 Fri Jan 25 20:36:39: Exporting certificates from Lets Encrypt Error opening input file /etc/letsencrypt/live/mydomainhere/fullchain.pem /etc/letsencrypt/live/mydomainhere/fullchain.pem: No such file or directory Fri Jan 25 20:36:39: jamf.tomcat8 not found. Exiting script! Fri Jan 25 20:36:39: If this is your first time running this script, you will need to remove /etc/letsencrypt and /var/git/letsencrypt Fri Jan 25 20:36:39: If this has worked before for you, please check and see if Tomcat is running.

sean-rabbitt commented 5 years ago

If you search in the script for a line: JSS_KEYSTORE_LOCATION= It may be better to hard code the location of the keystore rather than read from the JSS server XML. On a default install, JSS_KEYSTORE_LOCATION="/usr/local/jss/tomcat/.keystore" should solve the problem.