对 bip 代理服务器配置进行故障排除:致命:mkdir($HOME/.bip/logs) 没有这样的文件或目录

对 bip 代理服务器配置进行故障排除:致命:mkdir($HOME/.bip/logs) 没有这样的文件或目录

bip我正在尝试在代理服务器(即 AWS EC2 实例 - 虚拟专用服务器)上进行设置,当我尝试使用以下命令运行它时:

'sudo /usr/bin/bip -f .bip/bip.conf`

从我的/home/user目录中,我收到以下消息:

FATAL: mkdir($HOME/.bip/logs) No such file or directory

我认为我的文件不正确,因为我可以从默认配置文件的位置~/.bip/bip.conf运行命令。我的文件如下。~/.bip/bip_copy.confbip_copy.conf~/.bip/bip.conf

echo $HOME返回/home/ubuntu(我一直在调用命令的地方)。我的~/.bip/目录还包含我的bip.conf文件和logs目录。

我一直在遵循这些教程作为指导,但它们并没有帮助我解决这种情况:

http://blog.dustinkirkland.com/2011/08/keep-one-ssh-tunnel-to-bip-proxy-server.html http://nerderati.com/2010/11/perpetual-irc-the-proxy-edition/ https://wiki.linaro.org/Resources/HowTo/BIP

我的bip.conf

# bip default config file.
# Thou shoult change thy password

ip = "0.0.0.0";

# To connect a client to bip, try the port below, and
# be sure to set the password to the value
# specified in the network you want to connect to. 
port = 6667;

# If you set this to true, you'll only be able to connect to bip
# with a SSL capable IRC client. Be sure to generate a certificate
# for bip with 'make cert'
client_side_ssl = false;

log_level = 2;

pid_file="$HOME/.bip/bip.pid";

# This is where logs go. Channel and private messages will use that
# configuration value as a prefix, and then log_format to determine
# full log filename.
log_root = "$HOME/.bip/logs";

# Log format allows you to make log filenames depend on the log line's
# attributes. Here's a list :
# %u -> user name
# %n -> network name
# %Y -> 4 digit year
# %m -> 2 digit month
# %d -> 2 digit day
# %c -> destination (#chan, privates, ...)
#log_format = "%n/%Y-%m/%c.%d.log";

# Sets the frequency (in seconds) of log syncing (real write to kernel)
log_sync_interval = 5;

# Makes bip send the log of each channel and privates while
# you were not connected to the proxy upon connection. 
#backlog = true;        # enable backlog
# backlog_lines = 10;       # number of lines in backlog, 0 means no limit
# backlog_always = true;        # backlog even lines already backlogged
backlog = true;
backlog_lines = 200; 
backlog_always = false;
backlog_reset_on_talk = false;
# backlog_reset_connection = false;
backlog_msg_only = true; 

# If blreset_on_talk talking on an irc network has the same effect of issuing
# /bip blreset, meaning that stuffed logged before the command won't be read
# back on backlog
#blreset_on_talk = false;

# Network definition, a name and server info

network {
    name = "freenode";
    server { host = "irc.freenode.net"; port = 6667; };
};


# Configuration example with one user who connects to two irc networks
# To use the multi-server feature:
#  - define the connections
#  - chose and setup a different login for each connection
# on your irc client:
#  - Use the multi server feature of your client, the server beeing each time
#    the server where bip is running. In your client setup server password to:
#      username:password:connectionname
#  - do not store the password in clear here, use the bipmkpw util to generate
# a hash

# User structure is grouping information for a given user
user {
    # The name in bip of the user
    # This is used by bip only
    name = "lucas";

    # this user's password (md5(md5("tata"))) with seed - generated by bipmkpw
    password = "f3d93275fa....";


    # SSL certificates checking mode for user:
    # - "none" to accept anything;
    # - "basic" to accept if the certificate is contained in the store;
    # In "basic" mode, encountered untrusted certificates can be added to
    # the store interactively by connecting a client and "trusting" them.
    # - "ca" to do a complete certificate chain checking with the objects
    # in the store below (you have to put in it every cert, CRL, up to the
    # root CA). You have to build your store manually, so you may prefer
    # using "basic" unless you're a crypto zealot...
    ssl_check_mode = "none";

    # Location of the user's store for SSL certificate check
    # In "basic" mode, that must point to a single file with all trusted
    # certs concatenated together (the interactive "trust" appends to this
    # file).
    # In "ca" mode, it's a directory of a standard openssl store; you must
    # put PEM objects (certificates, CRLs...) with .pem extension and run
    # `c_rehash .' in it
    # ssl_check_store = "/home/bip`debian/.bip/trustedcerts.txt";

    # These will be the default for each connections
    default_nick = "testNickname";
    default_user = "testNickname";
    default_realname = "lucas";



    connection {
        name = "freenode";              # used by bip only
        network = "freenode";           # which IRC network to connect to

# Autojoined channels:
        channel { name = "#gslug"; };
        channel { name = "#help"; };
#       channel { name = "#help"; backlog = false; };
    };
};

答案1

$HOME当您在命令行或 shell 脚本中键入时,它会被 shell 扩展。在配置文件中,除非应用程序手册中另有说明,否则$HOME表示美元,大写 H,大写 O,大写 M,大写 E。因此更改行

pid_file="$HOME/.bip/bip.pid";

pid_file="/home/ubuntu/.bip/bip.pid";

类似地对于log_root.

相关内容