Python subprocess failed when called from service – CentOS
Below simple scripts, used to list keys in ssh-agent: list_keys.sh: #!/bin/bash ssh-add -l list_keys.py: if __name__ == '__main__': """ Creates log """ ... print("Start") print subprocess.check_output(["/root/list_keys.sh"]) It works well when called directly from the terminal. $python list_keys.py The log shows…