Skip to content

Instantly share code, notes, and snippets.

@ariestiyansyah
Last active April 11, 2016 02:48
Show Gist options
  • Save ariestiyansyah/f479848a2e1731c4c5f921d82326dcd1 to your computer and use it in GitHub Desktop.
Save ariestiyansyah/f479848a2e1731c4c5f921d82326dcd1 to your computer and use it in GitHub Desktop.
Generate Open edX Cert
#!/bin/bash
# change directory to edx-platform
cd /edx/app/edxapp/edx-platform
# prompt user, and read command line argument
read -p 'Enter course ID: ' idcourse
read -p "edXius, Are you sure you want to generate the certificate (Y/N)? " answer
# handle the command line argument we were given
while true
do
case $answer in
[yY]* ) echo "Okay Darth edXius, Start generating $idcourse "
sudo -u www-data /edx/bin/python.edxapp ./manage.py lms --settings aws ungenerated_certs -c $idcourse --insecure
break;;
[nN]* ) exit;;
* ) echo "edXius, just enter Y or N, please."; break ;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment