<commit_before>#! /bin/bash
#Defaults:
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
INSTALL_DIR="$DIR/roombooking"

echo 'Roombooking installer for Ubuntu 14.04 LTS'
read -p "This will install with default settings to: $INSTALL_DIR. Are you sure (Y/N)? " -n 1 -r
echo 
if [[ $REPLY =~ ^[Yy]$ ]]
then
    # do dangerous stuff
    echo '**** Download requirements\n'
    sudo apt-get install git python-virtualenv supervisor nginx
    
    echo '**** Cloning the repository\n'
    git clone https://github.com/visionect/roombooking.git $INSTALL_DIR
    cd $INSTALL_DIR
    
    echo '**** Create virtual env\n'
    virtualenv ./virt
    
    echo '**** Activating virtual env and installing packages\n'
    source ./virt/bin/activate
    pip install -r requirements.txt

    echo '**** Creating a new config file\n'
    echo '**** MAKE SURE YOU EDIT $INSTALL_DIR/server.conf AND ADD YOUR GOOGLE APPS CREDENTIALS!'
    cp $INSTALL_DIR/server.conf.example $INSTALL_DIR/server.conf

    echo '**** Installing the supervisord service in the local users crontab\n'
    COMMAND="$INSTALL_DIR/start_roombooking.sh"
    JOB="@reboot $command"
    cat <(fgrep -i -v "$command" <(crontab -l)) <(echo "$job") | crontab -

    echo '**** Symlinking the configuration for NGINX, service will be running on port 8000.\n'
    sudo ln -s $INSTALL_DIR/roombooking-nginx.conf /etc/nginx/sites-enabled/roombooking-nginx.conf

    echo "**** Done installing! Make sure you edit $INSTALL_DIR/server.conf (ie: nano $INSTALL_DIR/server.conf)"
    echo "**** You'll need to restart the server afterwards with $INSTALL_DIR/restart_roombooking.sh"
fi
<commit_msg>Added restarting nginx to the installer script.<commit_after>#! /bin/bash
#Defaults:
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
INSTALL_DIR="$DIR/roombooking"

echo 'Roombooking installer for Ubuntu 14.04 LTS'
read -p "This will install with default settings to: $INSTALL_DIR. Are you sure (Y/N)? " -n 1 -r
echo 
if [[ $REPLY =~ ^[Yy]$ ]]
then
    # do dangerous stuff
    echo '\n**** Download requirements\n'
    sudo apt-get install git python-virtualenv supervisor nginx
    
    echo '\n**** Cloning the repository\n'
    git clone https://github.com/visionect/roombooking.git $INSTALL_DIR
    cd $INSTALL_DIR
    
    echo '\n**** Create virtual env\n'
    virtualenv ./virt
    
    echo '\n**** Activating virtual env and installing packages\n'
    source ./virt/bin/activate
    pip install -r requirements.txt

    echo '\n**** Creating a new config file\n'
    echo '**** MAKE SURE YOU EDIT $INSTALL_DIR/server.conf AND ADD YOUR GOOGLE APPS CREDENTIALS!'
    cp $INSTALL_DIR/server.conf.example $INSTALL_DIR/server.conf

    echo '\n**** Installing the supervisord service in the local users crontab\n'
    COMMAND="$INSTALL_DIR/start_roombooking.sh"
    JOB="@reboot $command"
    cat <(fgrep -i -v "$command" <(crontab -l)) <(echo "$job") | crontab -

    echo '\n**** Symlinking the configuration for NGINX, service will be running on port 8000.\n'
    sudo ln -s $INSTALL_DIR/roombooking-nginx.conf /etc/nginx/sites-enabled/roombooking-nginx.conf
    sudo service nginx restart

    echo "\n**** Done installing! Make sure you edit $INSTALL_DIR/server.conf (ie: nano $INSTALL_DIR/server.conf)"
    echo "**** You'll need to restart the server afterwards with $INSTALL_DIR/restart_roombooking.sh"
fi

{'fraction_non_alphanumeric': 0.13133708864512303, 'fraction_numerical': 0.005929439667951379, 'mean_word_length': 3.5718157181571817, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2067237', 'n_tokens_mistral': 1164, 'n_tokens_neox': 1057, 'n_words': 346}