about summary refs log tree commit diff stats
path: root/tools/conf
diff options
context:
space:
mode:
authorSilvino Silva <silvino@bk.ru>2017-03-01 21:27:03 +0000
committerSilvino Silva <silvino@bk.ru>2017-05-13 16:40:44 +0100
commit079066bc153f3a6fe84b5da0b8fa8e584641b46d (patch)
tree5ed282dccdd6b8004a86f9c765843f0f5852f9c9 /tools/conf
parent40fc398cab05e1ae769554a50fb423ca38c3bfb6 (diff)
downloaddoc-079066bc153f3a6fe84b5da0b8fa8e584641b46d.tar.gz
overall revision
Diffstat (limited to 'tools/conf')
-rw-r--r--tools/conf/etc/nginx/nginx.conf13
-rwxr-xr-xtools/conf/etc/rc.d/git-daemon42
2 files changed, 44 insertions, 11 deletions
diff --git a/tools/conf/etc/nginx/nginx.conf b/tools/conf/etc/nginx/nginx.conf
index ddbdee6..8fca293 100644
--- a/tools/conf/etc/nginx/nginx.conf
+++ b/tools/conf/etc/nginx/nginx.conf
@@ -3,7 +3,7 @@
 #
 
 
-user nginx;
+user www;
 worker_processes auto;
 
 error_log /var/log/nginx/error.log;
@@ -20,16 +20,6 @@ http {
     include       mime.types;
     default_type  application/octet-stream;
 
-    ##
-    # SSL Settings
-    ##
-    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
-    ssl_prefer_server_ciphers on;
-
-    # ssl on;
-    ssl_certificate /etc/ssl/certs/nginx.crt;
-    ssl_certificate_key /etc/ssl/keys/nginx.key;
-
     #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
     #                  '$status $body_bytes_sent "$http_referer" '
     #                  '"$http_user_agent" "$http_x_forwarded_for"';
@@ -40,6 +30,7 @@ http {
     sendfile        on;
     #tcp_nopush     on;
 
+    client_max_body_size 8M;
     keepalive_timeout  65;
     client_body_timeout 12;
     client_header_timeout 12;
diff --git a/tools/conf/etc/rc.d/git-daemon b/tools/conf/etc/rc.d/git-daemon
new file mode 100755
index 0000000..8aa9d81
--- /dev/null
+++ b/tools/conf/etc/rc.d/git-daemon
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+SSD=/sbin/start-stop-daemon
+NAME=git-daemon
+PROG=$(git --exec-path)/${NAME}
+USER=www
+GROUP=www
+PIDFILE=/var/run/git-daemon.pid
+OPTS="--verbose --reuseaddr --base-path=/srv/gitolite/repositories"
+
+case $1 in
+    start)
+        echo "Starting ${NAME}..."
+        $SSD --start \
+            --pidfile ${PIDFILE} \
+            --exec ${PROG} -- ${OPTS} \
+            --detach --pid-file=${PIDFILE} \
+            --user=${USER} --group=${GROUP}
+
+    ;;
+    stop)
+        echo "Stopping ${NAME}..."
+        $SSD --stop --quiet --name git-daemon \
+                            --pidfile ${PIDFILE}
+        ;;
+    restart)
+        echo "Restarting ${NAME}..."
+        $0 stop
+        $0 start
+        ;;
+    status)
+        $SSD --status --pidfile $PIDFILE
+        case $? in
+        0) echo "$PROG is running with pid $(cat $PIDFILE )" ;;
+        3) echo "$PROG is not running" ;;
+        4) echo "Unable to determine the program status" ;;
+        esac
+        ;;
+    *)
+        echo "usage: $0 [start|stop|restart|status]"
+        ;;
+esac