📄 install.sh
字号:
#!/bin/bash## This is the install script.## If you are looking for a place to configure the installation directories,# check 'config.h'LOCALSTATEDIR=$(grep LOCALSTATEDIR config.h | awk -F \" '{ print $2 }')PREFDIR=$(grep PREFDIR config.h | awk -F \" '{ print $2 }')LOCKDIR=$(grep LOCKDIR config.h | awk -F \" '{ print $2 }')TMPDIR=$(grep TMPDIR config.h | awk -F \" '{ print $2 }')SBINDIR=$(grep SBINDIR config.h | awk -F \" '{ print $2 }')HTTPROOT=$(grep HTTPROOT config.h | awk -F \" '{ print $2 }')CGIBIN=$(grep CGIBIN config.h | awk -F \" '{ print $2 }')NMHTTP=${HTTPROOT}$(grep NMHTTP config.h | awk -F \" '{ print $2 }')#create directoriesif [ ! -d $LOCALSTATEDIR ]; then install -d -o mail -g mail -m 500 $LOCALSTATEDIRfiif [ ! -d $PREFDIR ]; then install -d -o mail -g mail -m 700 $PREFDIRfiif [ ! -d $LOCKDIR ]; then install -d -o mail -g mail -m 700 $LOCKDIRfiif [ ! -d $TMPDIR ]; then install -d -o mail -g mail -m 700 $TMPDIRfiif [ ! -d $HTTPROOT ]; then echo "Error: $HTTPROOT does not exist" exit -1fi#copy http directoryif [ ! -d $NMHTTP ]; then install -d -o nobody -g nobody -m 555 $NMHTTP cp -a images/* $NMHTTPfiif [ ! -d $CGIBIN ]; then echo "Error: $CGIBIN does not exist" exit -1fi#install nmail binaryinstall -o mail -g mail -s -m 6555 nmail $CGIBIN#install login_validate binaryinstall -o root -g root -m 4555 login_validate $SBINDIRif [ ! -f $PREFDIR/default ]; then echo "hostname=$(hostname)" > $PREFDIR/default chown mail.mail $PREFDIR/default chmod 600 $PREFDIR/defaultfi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -