【问题标题】:Cant run google cloudprint as daemon无法将谷歌云打印作为守护进程运行
【发布时间】:2014-04-01 19:56:20
【问题描述】:

我在安装 Google Cloudprint python 脚本时遇到了一些问题。

holmen@filserver:~/tmp$ sudo service cloudprint start
Starting Google Cloud Print: daemon module required for -d
        yum install python-daemon, or apt-get install python-daemon, or pip install python-daemon
holmen@filserver:~/tmp$ sudo apt-get install python-daemon
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-daemon is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

即使我已经安装了 python-daemon,我还是给了我一个错误。

我的 init-d 脚本如下所示:

#!/bin/bash
# /etc/rc.d/cloudprint
# Description: Starts the Google Cloud Print script on startup
# ----------------
#
### BEGIN INIT INFO
# Provides: Cloud-Print
# Required-Start: $cups $network $local_fs $syslog
# Required-Stop: $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: Start Google Cloud Print
### END INIT INFO

USER="holmen"
PIDFILE="/var/run/cloudprint/pid"

case $1 in
        start)
                echo -n "Starting Google Cloud Print: "
                sudo -u $USER cloudprint -d -p $PIDFILE
        ;;
        stop)
                echo -n "Stopping Google Cloud Print: "
                killall cloudprint
        ;;
        restart)
                echo -n "Restarting Google Cloud Print: "
                killall cloudprint
                sudo -u $USER cloudprint -d -p $PIDFILE
        ;;
        *)
                echo "Usage: cloudprint {start|stop|restart}"
        ;;
esac

【问题讨论】:

    标签: python linux debian google-cloud-print


    【解决方案1】:

    遇到了同样的问题并通过卸载守护程序模块并安装 pacakge python-daemon 来解决它,即在我的 debian 系统上:

    pip uninstall daemon
    apt-get install python-daemon
    

    【讨论】:

      猜你喜欢
      • 2015-06-02
      • 2023-03-02
      • 1970-01-01
      • 2012-12-03
      • 2011-08-25
      • 1970-01-01
      • 2011-02-15
      • 1970-01-01
      • 2014-07-17
      相关资源
      最近更新 更多