Introduction
Introduction Statistics Contact Development Disclaimer Help
annna-start-service - annna - Annna the nice friendly bot.
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6…
Log
Files
Refs
Tags
README
---
annna-start-service (760B)
---
1 #!/bin/sh
2
3 if [ $# -lt 2 ];
4 then
5 printf "usage: %s server channel\n" "$(basename "$0")"
6 exit 1
7 fi
8 server="$1"
9 channel="$2"
10
11 export PATH="$PATH:/home/annna/bin"
12
13 cfgbase="$(pwd)"
14 ircbase="$(cat ${cfgbase}/ircbase)"
15 serverbase="${ircbase}/${server}"
16
17 # Permissions
18 [ -d ${ircbase} ] && chmod o+rx ${ircbase}
19 [ -d ${serverbase} ] && chmod o+rx ${serverbase}
20
21 ## Channel handlers
22 [ -d "${serverbase}/${channel}" ] \
23 && chmod o+rx "${serverbase}/${channel}"
24 # For annna-say.
25 [ -p "${serverbase}/${channel}/in" ] \
26 && chmod o+w "${serverbase}/${channel}/in"
27 # For annna-cmd.
28 [ -f "${serverbase}/${channel}/out" ] \
29 && chmod o+w "${serverbase}/${channel}/out"
30
31 if [ -f "${serverbase}/${channel}/out" ];
32 then
33 annna-channel-service "${server}" "${channel}" &
34 fi
35
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.