$ chgrp nncp /usr/local/etc/nncp.hjson /var/spool/nncp
$ chmod g+r /usr/local/etc/nncp.hjson
$ chmod g+rwxs /var/spool/nncp
-$ echo 'umask: "007"' >> /usr/local/etc/nncp.hjson
+$ echo 'umask: "007"' >>/usr/local/etc/nncp.hjson
@end example
@item
# mkdir -p /var/service/.nncp-toss/log
# cd /var/service/.nncp-toss
-# cat > run <<EOF
+# cat >run <<EOF
#!/bin/sh -e
exec 2>&1
exec setuidgid uucp /usr/local/bin/nncp-toss -cycle 10
EOF
-# cat > log/run <<EOF
+# cat >log/run <<EOF
#!/bin/sh -e
exec setuidgid uucp multilog t ./main
EOF
# mkdir -p /var/service/.nncp-daemon/log
# cd /var/service/.nncp-daemon
-# cat > run <<EOF
+# cat >run <<EOF
#!/bin/sh -e
NNCPLOG=FD:4 exec envuidgid nncpuser tcpserver -DHRU -l 0 ::0 uucp \
/usr/local/bin/nncp-daemon -quiet -ucspi 4>&1
EOF
-# cat > log/run <<EOF
+# cat >log/run <<EOF
#!/bin/sh -e
exec setuidgid uucp multilog ./main
EOF
$ [fetch|wget] http://www.nncpgo.org/download/nncp-@value{VERSION}.tar.xz
$ [fetch|wget] http://www.nncpgo.org/download/nncp-@value{VERSION}.tar.xz.@{asc,sig@}
[verify signature]
-$ xz -d < nncp-@value{VERSION}.tar.xz | tar xf -
+$ xz -d <nncp-@value{VERSION}.tar.xz | tar xf -
$ cd nncp-@value{VERSION}
[optionally edit config]
$ bin/build
@section nncp-bundle
@example
-$ nncp-bundle [options] -tx [-delete] NODE [NODE @dots{}] > @dots{}
-$ nncp-bundle [options] -rx -delete [-dryrun] [NODE @dots{}] < @dots{}
-$ nncp-bundle [options] -rx [-check] [-dryrun] [NODE @dots{}] < @dots{}
+$ nncp-bundle [options] -tx [-delete] NODE [NODE @dots{}] >@dots{}
+$ nncp-bundle [options] -rx -delete [-dryrun] [NODE @dots{}] <@dots{}
+$ nncp-bundle [options] -rx [-check] [-dryrun] [NODE @dots{}] <@dots{}
@end example
With @option{-tx} option, this command creates @ref{Bundles, bundle} of
@example
$ nncp-cfgdir [options] [-cfg @dots{}] -dump /path/to/dir
-$ nncp-cfgdir [options] -load /path/to/dir > cfg.hjson
+$ nncp-cfgdir [options] -load /path/to/dir >cfg.hjson
@end example
@option{-dump} option dumps current configuration file to the
@section nncp-cfgenc
@example
-$ nncp-cfgenc [options] [-s INT] [-t INT] [-p INT] cfg.hjson > cfg.hjson.eblob
-$ nncp-cfgenc [options] -d cfg.hjson.eblob > cfg.hjson
+$ nncp-cfgenc [options] [-s INT] [-t INT] [-p INT] cfg.hjson >cfg.hjson.eblob
+$ nncp-cfgenc [options] -d cfg.hjson.eblob >cfg.hjson
@end example
This command allows you to encrypt provided @file{cfg.hjson} file with
@section nncp-cfgmin
@example
-$ nncp-cfgmin [options] > stripped.hjson
+$ nncp-cfgmin [options] >stripped.hjson
@end example
Print out stripped configuration version: only path to @ref{Spool,
@section nncp-cfgnew
@example
-$ nncp-cfgnew [options] [-area NAME] [-yggdrasil] [-nocomments] > new.hjson
+$ nncp-cfgnew [options] [-area NAME] [-yggdrasil] [-nocomments] >new.hjson
@end example
Generate new node configuration: private keys, example configuration
@verbatim
exec: {
sendmail: [/usr/sbin/sendmail, "-t"]
- appender: ["/bin/sh", "-c", "cat >> /append"]
+ appender: ["/bin/sh", "-c", "cat >>/append"]
}
@end verbatim
@section nncp-pkt
@example
-$ nncp-pkt [options] < pkt
-$ nncp-pkt [options] [-decompress] -dump < pkt > payload
+$ nncp-pkt [options] <pkt
+$ nncp-pkt [options] [-decompress] -dump <pkt >payload
$ nncp-pkt -overheads
@end example
src=${1%.txt}
redo-ifchange $src ../config
. ../config
-$PLANTUML -tutxt -pipe < $src
+$PLANTUML -tutxt -pipe <$src
@example
0 4 * * * cd /storage ; tmp=`mktemp` ; \
tree -f -h -N --du --timefmt \%Y-\%m-\%d |
- zstdmt -19 > $tmp && chmod 644 $tmp && mv $tmp TREE.txt.zst ; \
+ zstdmt -19 >$tmp && chmod 644 $tmp && mv $tmp TREE.txt.zst ; \
tree -J -f --timefmt \%Y-\%m-\%d |
- zstdmt -19 > $tmp && chmod 644 $tmp && mv $tmp TREE.json.zst
+ zstdmt -19 >$tmp && chmod 644 $tmp && mv $tmp TREE.json.zst
@end example
@example
$ ssh-keygen -Y verify -f PUBKEY-SSH.pub -I releases@@nncpgo.org -n file \
- -s nncp-@value{VERSION}.tar.zst.sig < nncp-@value{VERSION}.tar.zst
+ -s nncp-@value{VERSION}.tar.zst.sig <nncp-@value{VERSION}.tar.zst
@end example
@end table
tmp=`mktemp`
trap "rm -f $tmp" HUP PIPE INT QUIT TERM EXIT
-cat > $tmp
-sendmail -f "`reformail -x Return-Path: < $tmp`" $@ < $tmp
+cat >$tmp
+sendmail -f "`reformail -x Return-Path: <$tmp`" $@ <$tmp
git clone . $tmp/nncp-$release
cd $tmp/nncp-$release
git checkout v$release
-./version > VERSION
+./version >VERSION
cd src
go mod vendor
modvendor -v -copy="**/*_test.go **/words.go **/README.md **/main.go"
-name .goreleaser.yml -o \
-name .gitattributes \) -delete
-cat > doc/download.texi <<EOF
+cat >doc/download.texi <<EOF
@node Tarballs
@section Prepared tarballs
You can obtain releases source code prepared tarballs from
-D "VERSION `cat VERSION`" $@
}
-cat > $texi <<EOF
+cat >$texi <<EOF
\input texinfo
@documentencoding UTF-8
@settitle NEWS
@node News
@unnumbered News
-`sed -n '6,$p' < doc/news.texi`
+`sed -n '6,$p' <doc/news.texi`
@bye
EOF
mkinfo --output NEWS $texi
-cat > $texi <<EOF
+cat >$texi <<EOF
\input texinfo
@documentencoding UTF-8
@settitle NEWS.RU
@node Новости
@unnumbered Новости
-`sed -n '3,$p' < doc/news.ru.texi | sed 's/^@subsection/@section/'`
+`sed -n '3,$p' <doc/news.ru.texi | sed 's/^@subsection/@section/'`
@bye
EOF
mkinfo --output NEWS.RU $texi
-cat > $texi <<EOF
+cat >$texi <<EOF
\input texinfo
@documentencoding UTF-8
@settitle INSTALL
EOF
mkinfo --output INSTALL $texi
-cat > $texi <<EOF
+cat >$texi <<EOF
\input texinfo
@documentencoding UTF-8
@settitle THANKS
-sig-pgp "$tarball".asc -sig-ssh "$tarball".sig \
http://www.nncpgo.org/download/"$tarball" \
http://y.www.nncpgo.org/download/"$tarball" \
- https://nncp.mirrors.quux.org/download/"$tarball" < "$tarball" > "$tarball".meta4
+ https://nncp.mirrors.quux.org/download/"$tarball" <"$tarball" >"$tarball".meta4
size=$(( $(stat -f %z $tarball) / 1024 ))
release_date=$(date "+%Y-%m-%d")
- Generate NNCP configuration file using the command:
# umask 077
- # nncp-cfgnew > %%PREFIX%%/etc/nncp.hjson
+ # nncp-cfgnew >%%PREFIX%%/etc/nncp.hjson
EOM
}
]
func usage() {
fmt.Fprint(os.Stderr, "nncp-bundle -- Create/digest stream of NNCP encrypted packets\n\n")
- fmt.Fprintf(os.Stderr, "Usage: %s [options] -tx [-delete] NODE [NODE ...] > ...\n", os.Args[0])
- fmt.Fprintf(os.Stderr, " %s [options] -rx -delete [-dryrun] [NODE ...] < ...\n", os.Args[0])
- fmt.Fprintf(os.Stderr, " %s [options] -rx [-check] [-dryrun] [NODE ...] < ...\n", os.Args[0])
+ fmt.Fprintf(os.Stderr, "Usage: %s [options] -tx [-delete] NODE [NODE ...] >...\n", os.Args[0])
+ fmt.Fprintf(os.Stderr, " %s [options] -rx -delete [-dryrun] [NODE ...] <...\n", os.Args[0])
+ fmt.Fprintf(os.Stderr, " %s [options] -rx [-check] [-dryrun] [NODE ...] <...\n", os.Args[0])
fmt.Fprintln(os.Stderr, "Options:")
flag.PrintDefaults()
}
func usage() {
fmt.Fprint(os.Stderr, "nncp-cfgdir -- Convert configuration file to the directory layout.\n\n")
fmt.Fprintf(os.Stderr, "Usage: %s [options] [-cfg ...] -dump /path/to/dir\n", os.Args[0])
- fmt.Fprintf(os.Stderr, " %s [options] -load /path/to/dir > cfg.hjson\nOptions:\n", os.Args[0])
+ fmt.Fprintf(os.Stderr, " %s [options] -load /path/to/dir >cfg.hjson\nOptions:\n", os.Args[0])
flag.PrintDefaults()
}
func usage() {
fmt.Fprint(os.Stderr, "nncp-cfgenc -- encrypt/decrypt configuration file\n\n")
- fmt.Fprintf(os.Stderr, "Usage: %s [options] cfg.hjson > cfg.hjson.eblob\n", os.Args[0])
- fmt.Fprintf(os.Stderr, " %s [options] -d cfg.hjson.eblob > cfg.hjson\n", os.Args[0])
+ fmt.Fprintf(os.Stderr, "Usage: %s [options] cfg.hjson >cfg.hjson.eblob\n", os.Args[0])
+ fmt.Fprintf(os.Stderr, " %s [options] -d cfg.hjson.eblob >cfg.hjson\n", os.Args[0])
fmt.Fprintf(os.Stderr, " %s [options] -dump cfg.hjson.eblob\n", os.Args[0])
fmt.Fprintln(os.Stderr, "Options:")
flag.PrintDefaults()
fmt.Fprintf(os.Stderr, " %s [options] [-older X] {-all|-node NODE} -nock\n", os.Args[0])
fmt.Fprintf(os.Stderr, " %s [options] [-older X] {-all|-node NODE} -area\n", os.Args[0])
fmt.Fprintf(os.Stderr, " %s [options] [-older X] {-all|-node NODE} {-rx|-tx} [-hdr]\n", os.Args[0])
- fmt.Fprintf(os.Stderr, " %s [options] {-all|-node NODE} -pkt < ...\n", os.Args[0])
+ fmt.Fprintf(os.Stderr, " %s [options] {-all|-node NODE} -pkt <...\n", os.Args[0])
fmt.Fprintf(os.Stderr, " %s [options] {-all|-node NODE} -ack\n", os.Args[0])
fmt.Fprintln(os.Stderr, "-older option's time units are: (s)econds, (m)inutes, (h)ours, (d)ays")
fmt.Fprintln(os.Stderr, "Options:")
ctx.Neigh[*nodeOur.Id].Exec[handle] = []string{
"/bin/sh", "-c",
fmt.Sprintf(
- "echo $NNCP_NICE $0 $1 >> %s ; cat >> %s",
+ "echo $NNCP_NICE $0 $1 >>%s ; cat >>%s",
filepath.Join(spool, "mbox"),
filepath.Join(spool, "mbox"),
),
}
now=`date +%s`
-nncp-cfgnew > cfg
+nncp-cfgnew >cfg
nncp-cfgdir -cfg cfg -dump cfgdir
-echo "$PWD/spool" > cfgdir/spool
-echo "$PWD/log" > cfgdir/log
+echo "$PWD/spool" >cfgdir/spool
+echo "$PWD/log" >cfgdir/log
neigh=`rand32`
mkdir -p cfgdir/neigh/neigh
-for w in id exchpub signpub ; do echo $neigh > cfgdir/neigh/neigh/$w ; done
+for w in id exchpub signpub ; do echo $neigh >cfgdir/neigh/neigh/$w ; done
mkdir -p spool/tmp spool/$neigh/rx/hdr spool/$neigh/rx/seen spool/$neigh/tx/hdr
date_old=$(date -j -f %s +%FT%T $(( $now - (3600 * 24 * 7) )))
#!/bin/sh -e
-exec perl -ne 'print "$1\n" if /Version.* = "(.*)"$/' < "$(realpath -- $(dirname "$0"))"/src/nncp.go
+exec perl -ne 'print "$1\n" if /Version.* = "(.*)"$/' <"$(realpath -- $(dirname "$0"))"/src/nncp.go