blob: 50cd5e939de9e7368e963914a239ecf6a52c6d46 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
$NetBSD: patch-ae,v 1.22 2022/10/15 18:20:40 triaxx Exp $
- Default locations.
- Use 'su -' instead of just 'su'. Fixes priv delegation on SunOS
and AIX where Erlang relies on $HOME set correctly. Use a portable
su arg order while at it.
- At least SunOS has not wheel group.
- Portable grep calls.
- Fix spool directory.
--- ejabberdctl.template.orig 2022-05-06 13:12:22.000000000 +0000
+++ ejabberdctl.template
@@ -112,7 +112,7 @@ export SCRIPT_DIR
exec_cmd()
{
case $EXEC_CMD in
- as_install_user) su -s /bin/sh -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
+ as_install_user) su - "$INSTALLUSER" -c '"$@"' -- "$@" ;;
as_current_user) "$@" ;;
esac
}
@@ -218,14 +218,14 @@ uid()
# stop epmd if there is no other running node
stop_epmd()
{
- "$EPMD" -names 2>/dev/null | grep -q name || "$EPMD" -kill >/dev/null
+ "$EPMD" -names 2>/dev/null | grep name >/dev/null || "$EPMD" -kill >/dev/null
}
# make sure node not already running and node name unregistered
# if all ok, ensure runtime directory exists and make it current directory
check_start()
{
- "$EPMD" -names 2>/dev/null | grep -q " ${ERLANG_NODE%@*} " && {
+ "$EPMD" -names 2>/dev/null | grep " ${ERLANG_NODE%@*} " >/dev/null && {
pgrep -f "$ERLANG_NODE" >/dev/null && {
echo "ERROR: The ejabberd node '$ERLANG_NODE' is already running."
exit 4
|