merge all per-channel loops - annna - Annna the nice friendly bot. | |
git clone git://bitreich.org/annna/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws6… | |
Log | |
Files | |
Refs | |
Tags | |
README | |
--- | |
commit b17b70bb499d4e446b86fdc682611d2047c71d57 | |
parent d11be415933db76b3339637fc93b11336137666a | |
Author: Josuah Demangeon <[email protected]> | |
Date: Mon, 8 Mar 2021 00:25:16 +0100 | |
merge all per-channel loops | |
Signed-off-by: Annna Robert-Houdin <[email protected]> | |
Diffstat: | |
M annna-start-services | 32 ++++++++---------------------… | |
1 file changed, 8 insertions(+), 24 deletions(-) | |
--- | |
diff --git a/annna-start-services b/annna-start-services | |
@@ -18,6 +18,7 @@ iibase="/home/annna/irc/${server}" | |
modbase="/home/annna/bin/modules/" | |
hashtagfile="${modbase}/hashtags/hashtags.txt" | |
printnhashtags=2 | |
+channel_list="#bitreich-en #bitreich-fr #bitreich-de #bitreich-nl #bitreich-it… | |
hashtags() { | |
cat ${hashtagfile} 2>/dev/null | |
@@ -805,32 +806,15 @@ annna_radio() { | |
[ -d ${iiroot} ] && chmod o+rx ${iiroot} | |
[ -d ${iibase} ] && chmod o+rx ${iibase} | |
-# All channels | |
-channel_list="#bitreich-en #bitreich-fr #bitreich-de #bitreich-nl #bitreich-it… | |
-for chan in $channel_list; | |
-do | |
- [ -d "${iibase}/${chan}" ] \ | |
- && chmod o+rx "${iibase}/${chan}" | |
- [ -p "${iibase}/${chan}/in" ] \ | |
- && chmod o+w "${iibase}/${chan}/in" | |
-done | |
- | |
-# Channels with extra features or external scripts. | |
-## SCM (/scm/post-receive) | |
-## This one is handled by channel_list. | |
- | |
-## Radio (/br/radio/playlist.sh + this script) | |
-[ -d "${iibase}/#bitreich-radio" ] \ | |
- && chmod o+rx "${iibase}/#bitreich-radio" | |
-[ -p "${iibase}/#bitreich-radio/in" ] \ | |
- && chmod o+w "${iibase}/#bitreich-radio/in" | |
- | |
- | |
-# Channel handlers. | |
- | |
-## Common channel handler. | |
+## Channel handlers | |
for channel in $channel_list; | |
do | |
+ # Permissions | |
+ [ -d "${iibase}/${channel}" ] \ | |
+ && chmod o+rx "${iibase}/${channel}" | |
+ [ -p "${iibase}/${channel}/in" ] \ | |
+ && chmod o+w "${iibase}/${channel}/in" | |
+ | |
if [ -f "${iibase}/${channel}/out" ]; | |
then | |
{ |