소스 검색

Improving irssi daemon and beginning of OTR

Bob Mottram 11 년 전
부모
커밋
4b9635e676
1개의 변경된 파일34개의 추가작업 그리고 10개의 파일을 삭제
  1. 34
    10
      beaglebone.txt

+ 34
- 10
beaglebone.txt 파일 보기

2754
 On another computer (not the BBB).
2754
 On another computer (not the BBB).
2755
 
2755
 
2756
 #+BEGIN_SRC: bash
2756
 #+BEGIN_SRC: bash
2757
-sudo apt-get install irssi
2757
+sudo apt-get install irssi irssi-plugin-otr irssi-plugin-xmpp
2758
 irssi
2758
 irssi
2759
 #+END_SRC
2759
 #+END_SRC
2760
 
2760
 
2801
 By default irssi will use UTC time.  An example of setting to some other time zone is as follows:
2801
 By default irssi will use UTC time.  An example of setting to some other time zone is as follows:
2802
 
2802
 
2803
 #+BEGIN_SRC: bash
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
 #+END_SRC
2812
 #+END_SRC
2808
 
2813
 
2809
 By default Irssi does not look especially attractive.  To improve it's looks:
2814
 By default Irssi does not look especially attractive.  To improve it's looks:
2846
 /save
2851
 /save
2847
 #+END_SRC
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
 *** Usage with XChat
2875
 *** Usage with XChat
2850
 Within the network list click, *Add* and enter your domain name then click *Edit*.
2876
 Within the network list click, *Add* and enter your domain name then click *Edit*.
2851
 
2877
 
2867
 First install some prerequisites.
2893
 First install some prerequisites.
2868
 
2894
 
2869
 #+BEGIN_SRC: bash
2895
 #+BEGIN_SRC: bash
2870
-apt-get install irssi screen
2896
+apt-get install irssi irssi-plugin-otr irssi-plugin-xmpp screen
2871
 #+END_SRC
2897
 #+END_SRC
2872
 
2898
 
2873
 Create an initialisation script.
2899
 Create an initialisation script.
2961
 # Return: LSB-compliant code.
2987
 # Return: LSB-compliant code.
2962
 #
2988
 #
2963
 function start() {
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
 # Return: LSB-compliant code.
2996
 # Return: LSB-compliant code.
2973
 #
2997
 #
2974
 function stop() {
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
 checkEnvironment
3002
 checkEnvironment
3047
 groupadd irssi
3070
 groupadd irssi
3048
 usermod -aG irssi myusername
3071
 usermod -aG irssi myusername
3049
 update-rc.d irssid defaults
3072
 update-rc.d irssid defaults
3073
+chown -R myusername:irssi /home/myusername/.irssi
3050
 service irssid start
3074
 service irssid start
3051
 #+END_SRC
3075
 #+END_SRC
3052
 
3076