#!/bin/sh

### BEGIN INIT INFO
# Provides: openerp-server
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Enterprise Resource Management software
# Description: Open ERP is a complete ERP and CRM software.
### END INIT INFO PATH=/sbin:/bin:/usr/sbin:/usr/bin
# DAEMON=/usr/bin/openerp-server
DAEMON=/home/odoo/odoo/bin/python
NAME=odoo
DESC=odoo-8.0
CONFIG=/home/q/odoo-8.0.0/odoo.conf
LOGFILE=/home/q/odoo-8.0.0/log/odoo.log
USER=odoo
PIDFILE=/var/run/${NAME}.pid test -x ${DAEMON} || exit 0 set -e checkpid() {
[ -f $PIDFILE ] || return 1
pid=`cat $PIDFILE`
[ -d /proc/$pid ] && return 0
return 1
} do_start () {
echo -n "Starting ${DESC}: "
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid ${USER} --background --make-pidfile --exec ${DAEMON} -- /home/q/odoo-8.0.0/openerp-server -c ${CONFIG} --logfile=${LOGFILE}
echo "${NAME}."
} do_stop () {
echo -n "Stopping ${DESC}: "
start-stop-daemon --stop --quiet --pidfile $PIDFILE --oknodo
echo "${NAME}."
} do_status() { echo -n "Checking $NAME: " checkpid if [ $? -eq 1 ]; then
echo "stopped."
else
echo "running."
fi } # Main
case "${1}" in
start)
do_start
;; stop)
do_stop
;; restart|force-reload)
echo -n "Restarting ${DESC}: "
do_stop
sleep 1
do_start
;; status)
do_status
;; *)
N=/etc/init.d/${NAME}
echo "Usage: ${NAME} {start|stop|restart|force-reload}" >&2
exit 1
;;
esac exit 0

  

Centos Odoo Service Config的更多相关文章

  1. CentOS中service命令与/etc/init.d的关系以及centos7的变化

    缘由 由于个人经常在ubuntu和centos 系统中切换,习惯了以前的 ubuntu中 通过 /etc/init.d/xxx 进行软件服务控制.后来发现centos7中换了服务的控制方式:servi ...

  2. 【转】centos中service命令与/etc/init.d的关系以及centos7的变化

    centos中service命令与/etc/init.d的关系 service httpd start 其实是启动了存放在/etc/init.d目录下的脚本. 但是centos7的服务管理改规则了.C ...

  3. Centos 编写 service 启动

    Centos 系统服务脚本目录: [html] view plaincopyprint?   /usr/lib/systemd/ 有系统(system)和用户(user)之分, 如需要开机没有登陆情况 ...

  4. redhat/centos使用service控制启动与关闭

    原文地址: http://guodong810.blog.51cto.com/4046313/1285353 有时,我们自己安装了某个软件时,想让对这个服务更加容易的控制,在redhat/centos ...

  5. 一秒解决CentOS下service 功能 不能使用 bash: service: command not found

    首先检查自己是否 使用的是root用户 如果是并且还不能用-----执行以下操作 在centos系统中,如果/sbin目录下没有service这个命令,就会出现 bash: service: comm ...

  6. centos没有service命令的恢复方法(-bash: service: command not found)

    转载自:https://blog.csdn.net/u014175572/article/details/53375049?utm_source=itdadao&utm_medium=refe ...

  7. 解决CentOS下service 功能 不能使用 bash: service: command not found

    首先检查自己是否 使用的是root用户 在centos系统中,如果/sbin目录下没有service这个命令,就会出现 bash: service: command not found 解决步骤如下: ...

  8. CentOS 7 service systemnctl

    在之前的版本中关闭防火墙等服务的命令是 service iptables stop /etc/init.d/iptables stop 在RHEL7中,其实没有这个服务 [root@rhel7 ~]# ...

  9. CentOS随笔——Service与防火墙关闭

    Service后台服务管理 基本语法 service 服务名 start 开启服务 service 服务名 stop 关闭服务 service 服务名 restart 重启服务 service 服务名 ...

随机推荐

  1. MySQL的中文编码问题

    创建表格时,怎么让表格显示中文?注意:不区分大小写 mysql> ALTER TABLE 表格的名字 CONVERT TO CHARACTER SET UTF8; 怎么让默认的数据库支持中文字符 ...

  2. 【项目经验】EasyUI Tree

    ITOO5.0开始了,我参加了伟大的基础系统,从整体上来说,基础系统有三个职能: 1.自己的核心职能--选课(公共选修课,专业选修课),课表: 2.为其他系统提供真实数据: 3.维护信息 而近两三天, ...

  3. HeapSort自己yy-未完成

    #include <iostream> #include <cstdio> using namespace std; ; int a[maxn]; int HeapSize; ...

  4. 【spring 注解 错误】使用controller 作为后台给前台ajax交互数据出错

    controller作为后台与前台的ajax进行交互,后台的方法处理完成返回一个boolean类型的值,想传给前台用来判断是否执行成功,BUT,问题来了: 严重: Servlet.service() ...

  5. java运行jar命令提示没有主清单属性

    转自:http://jingyan.baidu.com/article/db55b60990f6084ba30a2fb8.html 可运行的jar:http://mushiqianmeng.blog. ...

  6. php代码效率测试

    对于一个被加载的页面,而遇到会卡的原因 ,代码量大,为了减少一句话分析,就采用分段式判断. 从php手册了解到,使用microtime函数,具体方法可参见php手册对这函数的用法 定义get_exec ...

  7. CentOS升级Python 2.6到2.7

    查看python的版本 python -V Python 2.6.6 下载Python   Python-2.7.8.tar.xz      链接:http://pan.baidu.com/s/1i4 ...

  8. poj2566 尺取法

    题意: 输入 n m  之后输入n个数  之后m个询问  对于每个询问 输入一个t    输出  三个数 ans l r  表示从l 到 r的所有数的和的绝对值最接近t 且输出这个和ans   思路: ...

  9. Swift3.0语言教程使用编码创建和初始化字符串

    Swift3.0语言教程使用编码创建和初始化字符串 使用编码创建和初始化字符串 创建和初始化字符串除了可以使用上文中提到的方法外,还可以使用init(coder:)方法,此方法一般不常使用,其语法形式 ...

  10. js动画实现侧边栏分享

    <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content ...