Changeset View
Changeset View
Standalone View
Standalone View
nix/redis-up-mac.nix
Show All 10 Lines | redis-entrypoint = writeShellApplication { | ||||
text = '' | text = '' | ||||
REDIS_CACHE_DIR=''${XDG_CACHE_HOME:-$HOME/Library/Caches}/Redis | REDIS_CACHE_DIR=''${XDG_CACHE_HOME:-$HOME/Library/Caches}/Redis | ||||
mkdir -p "$REDIS_CACHE_DIR" | mkdir -p "$REDIS_CACHE_DIR" | ||||
echo "View Redis Logs: tail -f $REDIS_CACHE_DIR/logs" >&2 | echo "View Redis Logs: tail -f $REDIS_CACHE_DIR/logs" >&2 | ||||
echo "Kill Redis server: pkill redis" >&2 | echo "Kill Redis server: pkill redis" >&2 | ||||
# 'exec' allows for us to replace bash process with MariaDB | # 'exec' allows for us to replace bash process with MariaDB | ||||
exec 3>&- | |||||
exec ${redis}/bin/redis-server \ | exec ${redis}/bin/redis-server \ | ||||
&> "$REDIS_CACHE_DIR"/logs | &> "$REDIS_CACHE_DIR"/logs | ||||
''; | ''; | ||||
}; | }; | ||||
# will create a shellchecked executable shell script located in $out/bin/<name> | # will create a shellchecked executable shell script located in $out/bin/<name> | ||||
# This shell script will be used to allow for impure+stateful actions | # This shell script will be used to allow for impure+stateful actions | ||||
in writeShellApplication { | in writeShellApplication { | ||||
Show All 19 Lines |