scribe/script/system_check
Edward Loveall 35b72ada37
Upgrade to Lucky 0.30.1
Upgrading to 0.31.0 should be very easy. It's just running `shards
update` in the root of the project. That should be all.
2022-07-17 11:55:51 -04:00

35 lines
1.3 KiB
Bash
Executable file

#!/usr/bin/env bash
source script/helpers/text_helpers
source script/helpers/function_helpers
# Use this script to check the system for required tools and process that your app needs.
# A few helper functions are provided to make writing bash a little easier. See the
# script/helpers/function_helpers file for more examples.
#
# A few examples you might use here:
# * 'lucky db.verify_connection' to test postgres can be connected
# * Checking that elasticsearch, redis, or postgres is installed and/or booted
# * Note: Booting additional processes for things like mail, background jobs, etc...
# should go in your Procfile.dev.
if command_not_found "yarn"; then
print_error "Yarn is not installed\n See https://yarnpkg.com/lang/en/docs/install/ for install instructions."
fi
if command_not_found "createdb"; then
MSG="Please install the postgres CLI tools, then try again."
if is_mac; then
MSG="$MSG\nIf you're using Postgres.app, see https://postgresapp.com/documentation/cli-tools.html."
fi
MSG="$MSG\nSee https://www.postgresql.org/docs/current/tutorial-install.html for install instructions."
print_error "$MSG"
fi
## CUSTOM PRE-BOOT CHECKS ##
# example:
# if command_not_running "redis-cli ping"; then
# print_error "Redis is not running."
# fi