dot

packages and services management
Log | Files | Refs | README

commit 54c702f27369ef2b43f5d4ccc4dc6c427619b16b
parent 7542f663dedd66127c7c6510ba44d0d5bb4b8664
Author: Josuah Demangeon <mail@josuah.net>
Date:   Fri,  9 Feb 2018 22:41:53 +0100

[add] ii: set nick to ${NICK}ii to differentiate with main client

Diffstat:
Mbin/daemon | 8+++-----
Mdaemon/ii | 2+-
Mskel/hosts | 4++--
3 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/bin/daemon b/bin/daemon @@ -1,12 +1,10 @@ #!/bin/sh -export LOG="${HOME}/.cache/log" - mkdir -p "${LOG}" case "${1}" in ('') - find "${HOME}/etc/daemon" -type f -mindepth 1 | sort | sed 's|.*/||' | + find "${ETC}/daemon" -type f -mindepth 1 | sort | sed 's|.*/||' | while IFS='' read -r service do printf '%-14s: %s\n' "${service}" \ @@ -17,10 +15,10 @@ case "${1}" in service="${2}" shift 2 - [ -f "${HOME}/etc/daemon/${service}" ] || + [ -f "${ETC}/daemon/${service}" ] || exec printf '%s: no script found\n' "${service}" - "${HOME}/etc/daemon/${service}" "$@" + "${ETC}/daemon/${service}" "$@" printf '%-14s: %s\n' "${service}" \ "$(pgrep -x "${service}" | tr '\n' ' ')" diff --git a/daemon/ii b/daemon/ii @@ -9,7 +9,7 @@ pgrep -f "ii -s ${host}" || exec ii \ -s "${host}" \ -i "${HOME}/.cache/irc" \ -p "${port}" \ - -n "${NICK}" \ + -n "${NICK}ii" \ -k PASS \ -f "${NAME}" \ 1>> "${VAR}/irc/${host}/log" \ diff --git a/skel/hosts b/skel/hosts @@ -1,5 +1,5 @@ -127.0.0.1 localhost irc-cyberia irc-unix irc-freenode irc-oftc -::1 localhost irc-cyberia irc-unix irc-freenode irc-oftc +127.0.0.1 localhost irc-cyberia irc-unix irc-freenode irc-oftc +::1 localhost irc-cyberia irc-unix irc-freenode irc-oftc 172.16.55.1 t470s 172.16.55.2 nas 172.16.55.3 rpi