-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add initial multi-architecture and OS support - Add FreeBSD support - Update documentation
- Loading branch information
1 parent
ce1f509
commit 29a51a9
Showing
7 changed files
with
106 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/sh | ||
|
||
# PROVIDE: vault | ||
# REQUIRE: LOGIN | ||
# KEYWORD: shutdown | ||
|
||
# shellcheck disable=SC1091 | ||
. /etc/rc.subr | ||
|
||
name="vault" | ||
# shellcheck disable=2034 | ||
rcvar=$(set_rcvar) | ||
|
||
|
||
load_rc_config $name | ||
# shellcheck disable=2154 | ||
: "${vault_enable="NO"}" | ||
# shellcheck disable=2154 | ||
: "${vault_users="vault"}" | ||
|
||
# shellcheck disable=2034 | ||
restart_cmd=vault_restart | ||
# shellcheck disable=2034 | ||
start_cmd=vault_start | ||
# shellcheck disable=2034 | ||
stop_cmd=vault_stop | ||
|
||
vault_start() { | ||
echo "Starting ${name}." | ||
for user in ${vault_users}; do | ||
mkdir /var/run/vault | ||
chown -R "{{ vault_user }}:{{ vault_group }}" /var/run/vault/ | ||
su -m "${user}" -c "{{ vault_bin_path }}/vault server -config={{ vault_main_config }} {% if vault_log_level is defined %}-log-level={{ vault_log_level | lower }}{% endif %}&" | ||
done | ||
} | ||
|
||
vault_stop() { | ||
echo "Stopping $name." | ||
pids=$(pgrep vault) | ||
pkill vault | ||
wait_for_pids "${pids}" | ||
} | ||
|
||
vault_restart() { | ||
vault_stop | ||
vault_start | ||
} | ||
|
||
run_rc_command "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
# File: FreeBSD.yml - FreeBSD OS variables for Vault | ||
|
||
vault_os_packages: | ||
- git | ||
- unzip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
v1.4.1 | ||
v1.5.0 |