Skip to content

Instantly share code, notes, and snippets.

@joncrain joncrain/setup.sh
Last active Feb 7, 2019

Embed
What would you like to do?
New MunkiReport dev environment including a new module
#!/bin/bash
dev_site_root=~/Documents/munkireport-awesome
module_name=awesome
git clone https://github.com/munkireport/munkireport-php.git $dev_site_root
cd $dev_site_root
#### Choose the branch to load:
# git checkout master
git checkout wip
# git checkout tags/v3.2.6
git pull
# echo '<?php' > config.php # needed for < v4
echo 'AUTH_METHODS="NOAUTH"' > .env
composer install --no-dev --no-suggest --optimize-autoloader
# composer update --no-dev
# composer dumpautoload --optimize --no-dev
php database/migrate.php
# can someone fix the bluetooth module so we don't need this again?
php database/migrate.php
mkdir custom_modules
cd custom_modules
##### this will edit the .env to add the full path to the custom_modules dir
echo "MODULE_SEARCH_PATHS=$(pwd)" >> ../.env
##### the actual script
../build/addmodule.sh $module_name
##### this will make sure that the module is loaded
echo "MODULES='$module_name,munkireport,managedinstalls,disk_report'" >> ../.env
php -S localhost:8080 -t $dev_site_root/public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.