mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-21 22:59:07 +00:00
10 lines
430 B
TypeScript
10 lines
430 B
TypeScript
import Exec from "Common/Server/Utils/Execute";
|
|
|
|
export default class SelfSignedSSL {
|
|
public static async generate(path: string, host: string): Promise<void> {
|
|
await Exec.executeCommand(
|
|
`mkdir -p ${path} && openssl req -new -x509 -nodes -subj "/C=US/ST=NY/L=NYC/O=Global Security/OU=IT Department/CN=example.com" -out ${path}/${host}.crt -keyout ${path}/${host}.key -days 99999 && chmod -R 777 ${path}`,
|
|
);
|
|
}
|
|
}
|