1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-19 00:13:33 +00:00
freebsd-ports/databases/cassandra4/files/cassandra.in
Lapo Luchini 678ef46e3a databases/cassandra4: Update to 4.0.8
- Add pre-fetch target to download Maven dependencies to avoid
  network access during build

PR:		265478
Approved by:	Angelo Polo <language.devel@gmail.com> (maintainer)
2023-05-15 23:23:57 +02:00

40 lines
893 B
Bash

#!/bin/sh
# PROVIDE: cassandra
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Be sure to configure full settings in %%ETCDIR%% prior to enabling daemon.
#
# Add the following lines to /etc/rc.conf or /etc/.conf.local to
# enable the Cassandra daemon:
# cassandra_enable: Set to "YES" to enable the daemon.
# cassandra_user: The user under which to run the daemon.
# Defaults to "cassandra".
. /etc/rc.subr
name=cassandra
rcvar=cassandra_enable
desc="Cassandra daemon"
load_rc_config $name
: ${cassandra_enable:=NO}
: ${cassandra_user:=cassandra}
pidfile=/var/run/cassandra/cassandra.pid
command=/usr/sbin/daemon
command_args="-frP ${pidfile} %%PREFIX%%/bin/cassandra -f"
start_precmd="${name}_prestart"
cassandra_prestart()
{
export JAVA_HOME=%%JAVA_HOME%%
install -d -o ${cassandra_user} /var/run/cassandra
install -d -o ${cassandra_user} /var/log/cassandra
}
run_rc_command "$1"