Browse code

Fix comment in install.sh script

Dario Rodriguez authored on 13/01/2016 13:01:57
Showing 1 changed files
... ...
@@ -15,7 +15,7 @@ cp sshchat sshchatd /var/local/sshchat/bin
15 15
 
16 16
 # 2. Add user "chat"
17 17
 
18
-adduser --system --group --gecos -,-,-,-,- --home /var/local/sshchat --shell /var/local/sshchat/bin --disabled-password chat
18
+adduser --system --group --gecos -,-,-,-,- --home /var/local/sshchat --shell /bin/false --disabled-password chat
19 19
 
20 20
 # 3. Add the directory for ssh login and data
21 21
 
... ...
@@ -62,7 +62,7 @@ case "$1" in
62 62
       $0 start
63 63
     ;;
64 64
   *)
65
-      echo "Usage: /etc/init.d/swiki {start|stop|restart|force-reload}"
65
+      echo "Usage: /etc/init.d/sshchatd {start|stop|restart|force-reload}"
66 66
       exit 1
67 67
     ;;
68 68
 esac
Browse code

install.sh: clean script, add invites directory

Dario Rodriguez authored on 19/12/2015 18:11:24
Showing 1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 #
3 3
 # SSHCHAT INSTALLATION
4 4
 #
5
-# NOTE: Instructions for a debian-based system with sysvinit and nginx
5
+# NOTE: Instructions for a debian-based system with sysvinit
6 6
 
7 7
 # 0. Compile program (if it has already been compiled, do nothing)
8 8
 
... ...
@@ -19,8 +19,8 @@ adduser --system --group --gecos -,-,-,-,- --home /var/local/sshchat --shell /va
19 19
 
20 20
 # 3. Add the directory for ssh login and data
21 21
 
22
-mkdir -p /var/local/sshchat/.ssh/../users/../run
23
-chown chat:chat /var/local/sshchat/.ssh /var/local/sshchat/users
22
+mkdir -p /var/local/sshchat/.ssh/../users/../invites/../run
23
+chown chat:chat /var/local/sshchat/.ssh /var/local/sshchat/users /var/local/sshchat/invites
24 24
 chmod 700 /var/local/sshchat/.ssh
25 25
 
26 26
 # 4. Make sshchatd an startable daemon. For sysvinit:
... ...
@@ -72,8 +72,4 @@ EOF
72 72
 chmod 755 /etc/init.d/sshchatd
73 73
 update-rc.d sshchatd defaults
74 74
 
75
-#5. Configure nginx so that chat.mydomain.com is redirected to sshchatd web port, using nginx as an SSL terminator
76
-
77
-echo "Please, configure nginx as reverse-proxy & ssl-terminator so that port 4798 is accesible in some URL"
78
-
79 75
 # XXX: TODO
Browse code

Basic installation script for debian/sysvinit

Dario Rodriguez authored on 18/12/2015 18:31:07
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,79 @@
1
+#!/bin/bash
2
+#
3
+# SSHCHAT INSTALLATION
4
+#
5
+# NOTE: Instructions for a debian-based system with sysvinit and nginx
6
+
7
+# 0. Compile program (if it has already been compiled, do nothing)
8
+
9
+cd src && make || exit 1
10
+
11
+# 1. Install program to /var/local/sshchat/bin
12
+
13
+mkdir -p /var/local/sshchat/bin
14
+cp sshchat sshchatd /var/local/sshchat/bin
15
+
16
+# 2. Add user "chat"
17
+
18
+adduser --system --group --gecos -,-,-,-,- --home /var/local/sshchat --shell /var/local/sshchat/bin --disabled-password chat
19
+
20
+# 3. Add the directory for ssh login and data
21
+
22
+mkdir -p /var/local/sshchat/.ssh/../users/../run
23
+chown chat:chat /var/local/sshchat/.ssh /var/local/sshchat/users
24
+chmod 700 /var/local/sshchat/.ssh
25
+
26
+# 4. Make sshchatd an startable daemon. For sysvinit:
27
+
28
+cat > /etc/init.d/sshchatd <<'EOF' 
29
+#! /bin/sh
30
+# /etc/init.d/sshchatd: start or stop sshchatd.
31
+### BEGIN INIT INFO
32
+# Provides:          sshchatd
33
+# Required-Start:    $network $local_fs $remote_fs
34
+# Required-Stop::    $network $local_fs $remote_fs
35
+# Should-Start:      $all
36
+# Should-Stop:       $all
37
+# Default-Start:     2 3 4 5
38
+# Default-Stop:      0 1 6
39
+# Short-Description: Start sshchatd at boot time
40
+# Description:       Manage the sschatd daemon.
41
+### END INIT INFO
42
+
43
+
44
+FLAGS="start 20 2 3 4 5 . stop 20 0 1 6 ."
45
+# NO_RESTART_ON_UPGRADE
46
+
47
+test -x /var/local/sshchat/bin/sshchatd || exit 0
48
+
49
+case "$1" in
50
+  start)
51
+      echo -n "Starting up sshchatd: sshchatd"
52
+      /sbin/start-stop-daemon --chdir /var/local/sshchat --chuid chat --background --make-pidfile --pidfile /var/local/sshchat/run/sshchatd.pid --start --quiet --exec /var/local/sshchat/bin/sshchatd
53
+      echo "."
54
+    ;;
55
+  stop)
56
+      echo -n "Shutting down sshchatd: sshchatd"
57
+      /sbin/start-stop-daemon --stop --quiet --pidfile /var/local/sshchat/run/sshchatd.pid
58
+      echo "."
59
+    ;;
60
+  restart|force-reload)
61
+      $0 stop
62
+      $0 start
63
+    ;;
64
+  *)
65
+      echo "Usage: /etc/init.d/swiki {start|stop|restart|force-reload}"
66
+      exit 1
67
+    ;;
68
+esac
69
+
70
+exit 0
71
+EOF
72
+chmod 755 /etc/init.d/sshchatd
73
+update-rc.d sshchatd defaults
74
+
75
+#5. Configure nginx so that chat.mydomain.com is redirected to sshchatd web port, using nginx as an SSL terminator
76
+
77
+echo "Please, configure nginx as reverse-proxy & ssl-terminator so that port 4798 is accesible in some URL"
78
+
79
+# XXX: TODO