Quellcode durchsuchen

Improving irssi daemon and beginning of OTR

Bob Mottram vor 11 Jahren
Ursprung
Commit
4b9635e676
1 geänderte Dateien mit 34 neuen und 10 gelöschten Zeilen
  1. 34
    10
      beaglebone.txt

+ 34
- 10
beaglebone.txt Datei anzeigen

@@ -2754,7 +2754,7 @@ service hybserv start
2754 2754
 On another computer (not the BBB).
2755 2755
 
2756 2756
 #+BEGIN_SRC: bash
2757
-sudo apt-get install irssi
2757
+sudo apt-get install irssi irssi-plugin-otr irssi-plugin-xmpp
2758 2758
 irssi
2759 2759
 #+END_SRC
2760 2760
 
@@ -2801,9 +2801,14 @@ If you're not using a self-signed certificate (self-signed is the default) then
2801 2801
 By default irssi will use UTC time.  An example of setting to some other time zone is as follows:
2802 2802
 
2803 2803
 #+BEGIN_SRC: bash
2804
-/load perl
2805
-/script exec $ENV{'TZ'}='Europe/London';
2806
-/save
2804
+echo "load perl" >> ~/.irssi/startup
2805
+echo "script exec $ENV{'TZ'}='Europe/London';" >> ~/.irssi/startup
2806
+#+END_SRC
2807
+
2808
+Also enable /Off The Record/ (OTR) messaging.
2809
+
2810
+#+BEGIN_SRC: bash
2811
+echo "load otr" >> ~/.irssi/startup
2807 2812
 #+END_SRC
2808 2813
 
2809 2814
 By default Irssi does not look especially attractive.  To improve it's looks:
@@ -2846,6 +2851,27 @@ Then run Irssi and enter the commands:
2846 2851
 /save
2847 2852
 #+END_SRC
2848 2853
 
2854
+*** Using irssi with Off The Record messaging (OTR)
2855
+Once you/re running irssi then you can enable OTR with:
2856
+
2857
+#+BEGIN_SRC: bash
2858
+/statusbar window add otr
2859
+/otr genkey mynick@network  (for example mynick@irc.freenode.net)
2860
+#+END_SRC
2861
+
2862
+Then to see your OTR fingerprint:
2863
+
2864
+#+BEGIN_SRC: bash
2865
+/otr info
2866
+#+END_SRC
2867
+
2868
+And to trust or distrust some one else's fingerprint.
2869
+
2870
+#+BEGIN_SRC: bash
2871
+/otr trust [fingerprint]
2872
+/otr distrust [fingerprint]
2873
+#+END_SRC
2874
+
2849 2875
 *** Usage with XChat
2850 2876
 Within the network list click, *Add* and enter your domain name then click *Edit*.
2851 2877
 
@@ -2867,7 +2893,7 @@ It may be useful to run a persistent Irssi session on the BBB.  This will enable
2867 2893
 First install some prerequisites.
2868 2894
 
2869 2895
 #+BEGIN_SRC: bash
2870
-apt-get install irssi screen
2896
+apt-get install irssi irssi-plugin-otr irssi-plugin-xmpp screen
2871 2897
 #+END_SRC
2872 2898
 
2873 2899
 Create an initialisation script.
@@ -2961,9 +2987,7 @@ function configure() {
2961 2987
 # Return: LSB-compliant code.
2962 2988
 #
2963 2989
 function start() {
2964
-    start-stop-daemon --start --quiet --oknodo --pidfile "$pidFile" \
2965
-        --make-pidfile --chuid "$user:$group" --background \
2966
-        --exec "$daemonExec" -- $daemonArgs
2990
+    start-stop-daemon --start -v -b -x /bin/su -p /tmp/irssi.screen.session -m --chdir /home/$user -- - $user -c "screen -D -m -S irssi -- irssi" 1>>/log.irssi
2967 2991
 }
2968 2992
 
2969 2993
 #
@@ -2972,8 +2996,7 @@ function start() {
2972 2996
 # Return: LSB-compliant code.
2973 2997
 #
2974 2998
 function stop() {
2975
-    start-stop-daemon --stop --quiet --oknodo --retry 30 --pidfile "$pidFile" \
2976
-        --chuid "$user:$group" --exec "$daemonExec" -- $daemonArgs
2999
+    start-stop-daemon --stop -x /bin/su -p /tmp/irssi.screen.session -q
2977 3000
 }
2978 3001
 
2979 3002
 checkEnvironment
@@ -3047,6 +3070,7 @@ Save and exit.  Then add your user to the irssi group and start the daemon.
3047 3070
 groupadd irssi
3048 3071
 usermod -aG irssi myusername
3049 3072
 update-rc.d irssid defaults
3073
+chown -R myusername:irssi /home/myusername/.irssi
3050 3074
 service irssid start
3051 3075
 #+END_SRC
3052 3076