Created
August 11, 2017 21:36
-
-
Save mattrude/7aefa28b7bbe12738ac200fbfcc2c581 to your computer and use it in GitHub Desktop.
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
diff -r d8e673854789 Makefile | |
--- a/Makefile Wed Apr 26 18:20:34 2017 +0200 | |
+++ b/Makefile Fri Aug 11 16:32:48 2017 -0500 | |
@@ -8,8 +8,8 @@ | |
WGET?=curl -O | |
LUA_VERSION=5.1 | |
-LUA_DIR=/usr/local | |
-LUA_LIBDIR=$(LUA_DIR)/lib/lua/$(LUA_VERSION) | |
+LUA_DIR=/usr/local/lua5.1 | |
+LUA_LIBDIR=/usr/include/lua5.1 | |
OUTPUT=use_unbound.lua lunbound.so | |
diff -r d8e673854789 lunbound.c | |
--- a/lunbound.c Wed Apr 26 18:20:34 2017 +0200 | |
+++ b/lunbound.c Fri Aug 11 16:32:48 2017 -0500 | |
@@ -3,8 +3,8 @@ | |
* This file is MIT/X11 licensed. | |
*/ | |
-#include <lualib.h> | |
-#include <lauxlib.h> | |
+#include "/usr/include/lua5.1/lualib.h" | |
+#include "/usr/include/lua5.1/lauxlib.h" | |
#include <unbound.h> | |
#ifndef NO_ROOT_TA |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: prosody | |
# Required-Start: $network $local_fs $remote_fs | |
# Required-Stop: $remote_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Prosody XMPP Server | |
### END INIT INFO | |
set -e | |
# /etc/init.d/prosody: start and stop Prosody XMPP server | |
DAEMON=/usr/bin/prosody | |
PIDPATH=/var/run/prosody | |
PIDFILE="$PIDPATH"/prosody.pid | |
RUNTIME=/usr/bin/lua5.1 | |
NICE= | |
MAXFDS= | |
CPUSCHED= | |
IOSCHED= | |
test -x "$DAEMON" || exit 0 | |
if [ -f /etc/default/prosody ] ; then | |
. /etc/default/prosody | |
fi | |
if [ ! -d "$PIDPATH" ]; then | |
mkdir "$PIDPATH"; | |
chown prosody:adm "$PIDPATH"; | |
fi | |
# Check that user 'prosody' exists | |
check_user() { | |
if ! getent passwd prosody >/dev/null; then | |
exit 1; | |
fi | |
} | |
start_opts() { | |
test -z "$NICE" || echo -n " --nicelevel $NICE" | |
test -z "$CPUSCHED" || echo -n " --procsched $CPUSCHED" | |
test -z "$IOSCHED" || echo -n " --iosched $IOSCHED" | |
} | |
. /lib/lsb/init-functions | |
test -z "$MAXFDS" || ulimit -n "$MAXFDS" | |
case "$1" in | |
start) | |
check_user | |
log_daemon_msg "Starting Prosody XMPP Server" "prosody" | |
if start-stop-daemon --start --quiet --oknodo --pidfile "$PIDFILE" --chuid prosody $(start_opts) --exec "$RUNTIME" -- "$DAEMON"; then | |
log_end_msg 0 | |
else | |
log_end_msg 1 | |
fi | |
;; | |
stop) | |
log_daemon_msg "Stopping Prosody XMPP Server" "prosody" | |
if start-stop-daemon --stop --retry 30 --quiet --oknodo --pidfile "$PIDFILE"; then | |
log_end_msg 0 | |
else | |
log_end_msg 1 | |
fi | |
;; | |
force-reload|restart) | |
log_daemon_msg "Restarting Prosody XMPP Server" "prosody" | |
start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile "$PIDFILE" | |
check_user log_end_msg | |
if start-stop-daemon --start --quiet --oknodo --pidfile "$PIDFILE" --chuid prosody $(start_opts) --exec "$RUNTIME" -- "$DAEMON"; then | |
log_end_msg 0 | |
else | |
log_end_msg 1 | |
fi | |
;; | |
reload) | |
log_daemon_msg "Reloading Prosody XMPP Server" "prosody" | |
if start-stop-daemon --stop --quiet --pidfile "$PIDFILE" --signal 1; then | |
log_end_msg 0 | |
else | |
log_end_msg 1 | |
fi | |
;; | |
status) | |
status_of_proc -p "$PIDFILE" "$DAEMON" prosody | |
;; | |
*) | |
log_action_msg "Usage: /etc/init.d/prosody {start|stop|restart|reload|status}" | |
exit 1 | |
esac | |
exit 0 |
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
/var/log/prosody/prosody.log /var/log/prosody/prosody.err /var/log/prosody/prosody.debug { | |
weekly | |
rotate 28 | |
compress | |
create 640 prosody prosody | |
postrotate | |
/etc/init.d/prosody reload > /dev/null | |
endscript | |
sharedscripts | |
missingok | |
notifempty | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment