Lines 7-25
depend() {
Link Here
|
7 |
} |
7 |
} |
8 |
|
8 |
|
9 |
check_config() { |
9 |
check_config() { |
10 |
if [[ ! -f ${PSYBNC_CONFIG} ]] |
10 |
if [ ! -f "${PSYBNC_CONFIG}" ] |
11 |
then |
11 |
then |
12 |
eerror "Please set \$PSYBNC_CONFIG in /etc/conf.d/psybnc!" |
12 |
eerror "Please set \$PSYBNC_CONFIG in /etc/conf.d/psybnc!" |
13 |
return 1 |
13 |
return 1 |
14 |
fi |
14 |
fi |
15 |
|
15 |
|
16 |
if [[ ! -d "${PSYBNC_HOME}" ]] |
16 |
if [ ! -d "${PSYBNC_HOME}" ] |
17 |
then |
17 |
then |
18 |
eerror "Please set \$PSYBNC_HOME in /etc/conf.d/psybnc!" |
18 |
eerror "Please set \$PSYBNC_HOME in /etc/conf.d/psybnc!" |
19 |
return 1 |
19 |
return 1 |
20 |
fi |
20 |
fi |
21 |
|
21 |
|
22 |
if [[ -z "${PSYBNC_USER}" ]] |
22 |
if [ -z "${PSYBNC_USER}" ] |
23 |
then |
23 |
then |
24 |
eerror "Please set \$PSYBNC_USER in /etc/conf.d/psybnc!" |
24 |
eerror "Please set \$PSYBNC_USER in /etc/conf.d/psybnc!" |
25 |
return 1 |
25 |
return 1 |
Lines 29-35
check_config() {
Link Here
|
29 |
start() { |
29 |
start() { |
30 |
check_config || return 1 |
30 |
check_config || return 1 |
31 |
ebegin "Starting psyBNC" |
31 |
ebegin "Starting psyBNC" |
32 |
start-stop-daemon --start --quiet --chuid "${PSYBNC_USER}" --chdir "${PSYBNC_HOME}" --exec /usr/bin/psybnc -- "${PSYBNC_CONFIG}" &>/dev/null |
32 |
start-stop-daemon --start --quiet --chuid "${PSYBNC_USER}" --chdir "${PSYBNC_HOME}" --exec /usr/bin/psybnc -- "${PSYBNC_CONFIG}" >/dev/null 2>&1 |
33 |
eend $? |
33 |
eend $? |
34 |
} |
34 |
} |
35 |
|
35 |
|
36 |
- |
|
|