从本地 Windows 或 Mac 计算机远程重启 Linux 服务

发布于 2024-08-22 00:18:40 字数 191 浏览 5 评论 0原文

有时我的媒体服务器不更新其数据库,修复它的唯一方法是重新启动守护程序。

我希望用户能够简单地运行可执行文件或脚本来执行此操作,而无需向他们透露任何登录信息(这可能会导致无意的头痛)。

我觉得最简单的方法是在 samba 共享上放置一个可以运行的可执行文件/脚本。用户将运行 Windows 或 Mac,它们都与服务器位于同一本地网络上。

Sometimes my media server does not update its database, the only way to fix it is to restart the daemon.

I would like users to be able to simply run an executable or script to do so without revealing any login information to them (which might result in inadvertent headaches).

I feel the easiest way to do this would be to have an executable/script located on a samba share which they can run. The users would be running Windows or Macs which are all on the same local network as the server.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

落日海湾 2024-08-29 00:18:40

编写一个小型 CGI 脚本或 Web 应用程序,其中有一个按钮,按下该按钮即可重新启动守护进程。

Write up a small CGI script or web app that has a button that when pushed restarts the daemon.

不念旧人 2024-08-29 00:18:40

您只需要特权守护进程(或频繁的 cron)和 CGI​​ 脚本之间的一些通信。让 CGI 脚本创建一个文件,如果守护程序或 cron 发现它,则重新启动服务并取消链接该文件。原始,但有效。

正如Ignacio所说,有很多很多支持CGI的轻量级HTTP服务器。

You just need some communication between a privileged daemon (or frequent cron) and the CGI script. Have the CGI script create a file, if the daemon or cron finds it have it restart the service and unlink the file. Primitive, but effective.

As Ignacio said, there are many, many lightweight HTTP servers that support CGI.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文