#!/usr/bin/env bash
#########################################
#Copyright (c) 2023 ABLECLOUD Co. Ltd.
#
#mold 패키징하는 스크립트
#
#최초작성자 : 배태주 책임
#최초작성일 : 2023-10-19
#########################################
timedate=`date +%m-%d-%y-%H%M%S`

mv /etc/cloudstack/management/cloud.jks /etc/cloudstack/management/cloud.jks-$timedate

echo "Certificate renewal begins."
keytool -genkey -alias ablecloud -keyalg RSA -keypass vmops.com -storepass vmops.com -keystore /etc/cloudstack/management/cloud.jks
echo "Certificate renewal has been completed. Please mold restart"