38673a0736
git-svn-id: svn://svn.openwrt.org/openwrt/packages@21536 3c298f89-4303-0410-b956-a3cf2f4a3e73
33 lines
558 B
Bash
33 lines
558 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2010 OpenWrt.org
|
|
|
|
START=99
|
|
EXTRA_COMMANDS="status"
|
|
EXTRA_HELP=" status Print the status of the service"
|
|
|
|
BIN=/usr/bin/prosodyctl
|
|
LOG_D=/var/log/prosody
|
|
RUN_D=/var/run/prosody
|
|
PID_F=$RUN_D/prosody.pid
|
|
RUN_USER=prosody
|
|
RUN_GROUP=prosody
|
|
|
|
start() {
|
|
[ -d $LOG_D ] || ( mkdir -p $LOG_D && chown $RUN_USER:$RUN_GROUP $LOG_D )
|
|
[ -d $RUN_D ] || ( mkdir -p $RUN_D && chown $RUN_USER:$RUN_GROUP $RUN_D )
|
|
|
|
$BIN start
|
|
}
|
|
|
|
stop() {
|
|
$BIN stop
|
|
}
|
|
|
|
reload() {
|
|
[ -f $PID_F ] && kill -HUP $(cat $PID_F)
|
|
}
|
|
|
|
status() {
|
|
$BIN status
|
|
}
|