我创建了一个ClamAV的访问扫描系统服务,使我可以启用,启动,然后离开它,而不必再触摸它。
我可以手动启动服务,而且运行良好。但它仍然无法在登录后按预期自动启动。在这两种情况下,都没有活动的网络连接。
我相信下面的日记输出(在文章的最后一个输出部分)可能是一条线索:
rc.local[1188]: ERROR: ClamClient: could not connect to remote clam daemon, Couldn't connect to server
rc.local[1188]: ERROR: Clamonacc: daemon is local, but a c
我的/etc/rc.local脚本中有一个命令,它应该在启动期间启动微型RSS的更新守护进程,但是在启动时不会执行该脚本。为什么?
整个/etc/rc.local文件:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disa
我的rc.local服务在启动时执行一个python脚本:它可以正常工作,但在任何地方都不进行日志记录,除非出现错误并使用非零代码退出。此脚本运行计划操作,因此它将在后台运行挂起,除非出现错误或手动停止。
这就是我的rc.local的样子:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on e
我有一个使用msqllib的程序。它扫描我构建的一些硬件,然后更新mysql数据库。这个程序已经运行了很多年了,但是我从未能够在系统重新启动时自动启动它。现在我有一个权力循环的问题,这是我无法控制的,所以想让它自动运行。
在rc.local中:我有:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value
我编写了一个简单的bash脚本:
#!/bin/bash
echo "hi" > log
exit 0
使其可执行并成功运行。我将我的rc.local编辑成以下内容:
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enab
我正在重写我的rails应用程序以与rails 3一起工作,当我迁移acts_as_taggable_on迁移时,我得到了这个错误:
== CreatePosts: migrating ====================================================
-- create_table(:posts)
rake aborted!
An error has occurred, this and all later migrations canceled:
SQLite3::SQLException: table "posts" alread
我可以手动运行我的/etc/rc.local文件,它在启动时运行(将字符串回显到文件中),但由于某些原因,永久(npm包)失败。如果有帮助的话,我正在EC2实例上运行Amazon Linux AMI。
我可以在哪里了解它失败的原因,或者你能告诉我我做错了什么吗?
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the ful
我的rc.local有一个问题,它不会在服务器启动时自动运行包含在其中的命令行。但是,手动运行rc.local可以正常工作,并启动脚本。
操作系统: Ubuntu 20.04.2 LTS
这是我的rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In o
为什么我会得到以下脚本中的“拒绝权限”错误:
#!/bin/sh
if [ -z $1 ]; then
echo "no argument given"
exit 1
fi
for i in /sys/class/rc/rc*; do
if [ -e "$i/device/driver/$1" ]; then
number=echo $i | sed 's%/sys/class/rc/rc([0-9]+)%$0%'
echo "found $number"
fi
done
我想把一个项目推给heroku.
我在上面说的那一步:rails new myapp --database=postgresql
在我创建命令之后:rails new heroku
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-2.0.0-rc2/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. I
我正在尝试让我的脚本在启动时运行。我正在使用UbuntuServer16.04。
以下是/etc/r.local的确切内容。
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just c
我创建了一个脚本来启用我的蓝牙驱动程序。然后,我使用rc.local在启动时运行它。但是,这不管用。
当运行命令systemctl status rc-local.service时,我得到:
Failed to issue method call: no such interface 'org.freedesktop.DBus.Properties'
on object at path /org/freedesktop/systemd1/unit/rc_2dlocal_2eservice
我应该得到的是看上去像这样:
rc-local.service - /etc/rc.l