@ -6,19 +6,16 @@ START=99
USE_PROCD=1
USE_PROCD=1
BIN=/usr/bin/prosodyctl
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_service() {
start_service() {
[ -d /var/run/prosody ] || {
[ -d /var/run/prosody ] || {
mkdir -m 0755 -p /var/run/prosody
mkdir /var/run/prosody
chmod 0755 /var/run/prosody
chown prosody:prosody /var/run/prosody
chown prosody:prosody /var/run/prosody
}
}
[ -d /var/log/prosody ] || {
[ -d /var/log/prosody ] || {
mkdir -m 0755 -p /var/log/prosody
mkdir /var/log/prosody
chmod 0755 /var/log/prosody
chown prosody:prosody /var/log/prosody
chown prosody:prosody /var/log/prosody
}
}
@ -27,21 +24,18 @@ start_service() {
chown -R prosody:prosody /etc/prosody/data
chown -R prosody:prosody /etc/prosody/data
}
}
[ -f /sbin/paxctl ] && {
paxctl -v /usr/bin/ > /dev/null 2>&1
[ $? -ne 0 ] && {
cp /usr/bin/lua /tmp
paxctl -c -m /tmp/lua
cp -f /tmp/lua /usr/bin/lua
}
}
procd_open_instance
procd_open_instance
procd_set_param command "$BIN" start
procd_set_param command "$BIN" start
procd_set_param file /etc/prosody/prosody.cfg.lua
procd_set_param file /etc/prosody/prosody.cfg.lua
procd_set_param user prosody
procd_set_param group prosody
procd_close_instance
procd_close_instance
}
}
stop_service() {
stop_service() {
${BIN} stop
${BIN} stop
}
}
reload_service() {
${BIN} reload
}