📄 install.sh
字号:
#!/bin/sh## src/install.sh# This script is part of the IPTraf installation system. Do not attempt# to run this directly from the command prompt.#if [ "$1" = "" ]; then echo "This script is part of the IPTraf installation system, and" echo "should not be run by itself." exit 1fiINSTALL=/usr/bin/installTARGET=$1WORKDIR=$2LOGDIR=$3LOCKDIR=$4echoecho "*** Installing executable programs and preparing work directories"echoecho ">>> Installing iptraf in $TARGET"$INSTALL -m 0700 -o root -g root -s iptraf $TARGETecho ">>> Installing rvnamed in $TARGET"$INSTALL -m 0700 -o root -g root -s rvnamed $TARGETif [ ! -d $WORKDIR ]; then echo ">>> Creating IPTraf work directory $WORKDIR"else echo ">>> IPTraf work directory $WORKDIR already exists" echo "*** Clearing non-TCP filter data file" rm -f $WORKDIR/othfilter.datfi$INSTALL -m 0700 -o root -g root -d $WORKDIRif [ ! -d $LOGDIR ]; then echo ">>> Creating IPTraf log directory $LOGDIR"else echo ">>> IPTraf log directory $LOGDIR already exists"fi$INSTALL -m 0700 -o root -g root -d $LOGDIRif [ ! -d $LOCKDIR ]; then echo ">>> Creating IPTraf lockfile directory $LOCKDIR"else echo ">>> IPTraf lockfile directory $LOCKDIR already exists"fi$INSTALL -m 0700 -o root -g root -d $LOCKDIRechoecho "*** iptraf and rvnamed executables are in $TARGET"echo "*** Log files are placed in $LOGDIR"echoecho "======================================================================"echoecho "Please read the RELEASE-NOTES file for important new information about"echo "this version. You can view this file now (will require the 'less'"echo "program in /usr/bin. Press Q to quit when done)."echoecho -n "Would you like to view the RELEASE-NOTES file now (Y/N)? "; read YESNOif [ "$YESNO" = "y" -o "$YESNO" = "Y" ]; then less ../RELEASE-NOTESficlearechoecho "====================================================================="echoecho "Thank you for installing IPTraf. You can now start IPTraf by issuing"echo "the command"echoecho " $TARGET/iptraf"echoecho "at your shell prompt. You can also add $TARGET to your PATH environment"echo "variable to avoid having to type the pathname when invoking the program."echoexit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -