关于service: command not found[shell]

时间:2017-06-24 ┊ 阅读:7,989 次 ┊ 标签: 系统 , 问题 , 命令

前几天弄了https证书的自动更新脚本,测试都ok了, 不过今天看证书日期没有真正的更新。
查了一下log,发现证书更新成功了,不过nginx没有成功重新load配置文件
提示如下:

xxx.sh: line 888: service: command not found

查了一下可能是环境变量问题,不过这会不想乱改变量,直接加个绝对路径吧
然后找到service在/sbin下面,直接改sh语句为:

/sbin/service xxx.sh

然后测试一次,OK了。

-------------------------
17-06-24 22:28:01
-------------------------
nginx: the configuration file ***nginx.conf syntax is ok
nginx: configuration file ***nginx.conf test is successful
重新载入 nginx:

文章评论

添加新评论

温馨提醒:如果您是第一次在本站留言,需要审核后才能显示哦!

相关文章

ValueError: Error getting directory

ValueError: Error getting directory

ssl证书过期了 明明自动renew的 然后看log已经好久没更新成功了 查半天是当前server不信任远程连接 只能自己改代码 报错: 21-12-17 13:01:11 Generate CSR...amkevin.csr amkevin.csr generated. /home/www...
阅读全文>>
Introduction to ILE RPG Activation Groups

Introduction to ILE RPG Activation Groups

Learn how activation groups can help your ILE RPG programs run more efficiently, how to specify the type of group to use, and closing and reclaimin...
阅读全文>>
T480自动关机无法启动(解决办法)

T480自动关机无法启动(解决办法)

周五升级更新后,用一会就关机,还开不了,怎么按开机键也没有反应。 周六折腾一上午,拔电源,断电,20秒复位,把电池都拿下来了。都不行。 下午实在没办法了,给售后打电话让拿去检测一下。 然后拿售后去了,给检测一会没问题,说内存不干净给擦一下好了,开机正常了。 付款50块检测费,开心的拿回家,一...
阅读全文>>
Office 2016 Client Software License Management Tool

Office 2016 Client Software License Management Tool

Office 2016 Client Software License Management Tool Usage cscript ospp.vbs /Option:Value ComputerName User Password ComputerName: Name of remote c...
阅读全文>>
office2016 产品已激活 却同时显示需要激活(解决办法)

office2016 产品已激活 却同时显示需要激活(解决办法)

直接上命令吧: c:\Program Files\Microsoft Office\Office16>cscript.exe ospp.vbs /dstatus Microsoft (R) Windows Script Host Version 5.812 版权所有(C) Microso...
阅读全文>>