⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 postinst

📁 ntop 3.2的源代码
💻
字号:
#! /bin/sh## Copyright 2001,2002 by Dennis Schoen <ds@teuto.net>## This program is free software; you can redistribute it and/or modify# it under the terms of the GNU General Public License as published by# the Free Software Foundation; either version 2 of the License, or# (at your option) any later version.## This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.## You should have received a copy of the GNU General Public# License along with this program; if not, write to the Free# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,# MA  02111-1307  USA.# Source debconf library. /usr/share/debconf/confmodule# Get ntop userdb_get ntop/userUSER=$RETdb_get ntop/createuserCREATEUSER=$RET# Creating ntop group if he isn't already thereif ! grep -q ^$USER: /etc/passwd; then  if [ "$CREATEUSER" = "true" ]; then    echo Adding system user: $USER.    adduser --system --group --home /var/lib/ntop $USER  fifi# make status dir owned by userif grep -q ^$USER: /etc/passwd; then  chown $USER /var/lib/ntop  chown $USER /var/log/ntopelse  db_input high ntop/usernotice || true  db_gofi# ask for initial admin passworddb_input high ntop/adminpass || PASS_RETCODE=$? || truedb_godb_get ntop/adminpassPASS=$RET# set the initial admin passwordif [ ! "$PASS_RETCODE" = 30 ] ; then  echo Setting initial admin password.  ntop -t 0 -u ntop -P /var/lib/ntop/ --set-admin-password=$PASSfi# decide if we want to start the daemon on bootdb_get ntop/modeMODE=$RET# Record debconf configuration# 1. Stuff needed for the init scriptINITCFG=/etc/ntop/init.cfgcat > $INITCFG <<EOF# This file is automatically generated !## YOU MAY MODIFY THIS FILE# but we recommend to use dpkg-reconfigure ntop instead.# It will be regenerated on each update.EOFdb_get ntop/getopt# Remove unsupported -N option (does not exist in this version)GETOPT=`echo " $RET" | sed -e 's/,//g;s/[[:space:]]*-N[[:space:]]*//g;'`db_get ntop/sslportSSLPORT=$RETdb_get ntop/portPORT=$RETdb_get ntop/interfacesINTERFACES=$RETdb_get ntop/traceTRACE=$RETecho USER=\"$USER\" >> $INITCFGecho GETOPT=\"$GETOPT\" >> $INITCFGecho PORT=\"$PORT\" >> $INITCFGecho SSLPORT=\"$SSLPORT\" >> $INITCFGecho INTERFACES=\"$INTERFACES\" >> $INITCFGecho TRACE=\"$TRACE\" >> $INITCFGdb_stopif [ -x "/etc/init.d/ntop" ]; then  if [ "$MODE" = "true" ]; then    update-rc.d ntop defaults >/dev/null    /etc/init.d/ntop start  else    update-rc.d -f ntop remove >/dev/null 2>&1 fifi#DEBHELPER#

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -