We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如题
The text was updated successfully, but these errors were encountered:
我目前用以下systemd代码自启动,能成功在后台运行,但是json文件不能被改写,网页看不到最新数据。 [Unit] Description=Run a Custom Script at Startup After=default.target
[Service] User=root ExecStart=/home/status.sh
[Install] WantedBy=multi-user.target
Sorry, something went wrong.
可以使用screen来管理
此处写入的是这个文件$server_name.json,server_name是我们在这里指定的。 本着尽量简单的原则,我们可以将 ExecStart=/home/status.sh 改为 ExecStart=cd your_destination_path && /home/status.sh 这样应该可以正确写入到此路径下的status.json 第二种方法是直接将这里的server_name直接赋值为status.json文件的绝对路径。
$server_name.json
server_name
ExecStart=/home/status.sh
ExecStart=cd your_destination_path && /home/status.sh
status.json
No branches or pull requests
如题
The text was updated successfully, but these errors were encountered: