Comments (7)
Had the same problem and i didn't had RootDirectory. Without RootDirectory i had the same problem with the working dir, even if i've removed the "
from service.
Thanks for the report. I need to look into systemd unit files more, again.
from service.
Hi,
Can you please let me know the progress on this bug, as I am facing the same issue. I am setting some value in working directory alone but it is not reflecting. Can you please share the alternative way to set the PWD value in systemd service file.
Thanks
from service.
I have not yet looked into this. Thanks for the ping. I'll research this later this week hopefully.
from service.
Can you please provide some alternative approach for this. As my service is not running properly due to this. I need to change the current working directory to some other dir in service file. which will enable my server to pick the correct path using PWD.
from service.
Any update on this?
from service.
I don't know for RootDirectory but WorkingDirectory doesn't support double quotes (at least with the version of systemd that's present on Ubuntu 16.04). The solution is to escape the path with systemd-escape --path
and prepend a leading '/' to the result.
WorkingDirectory="/var/path with spaces in it/bin" [ DOES NOT work ]
WorkingDirectory=/var-path\x20with\x20spaces\x20in\x20it-bin [ DOES work ]
More info here:
https://www.freedesktop.org/software/systemd/man/systemd-escape.html
https://serverfault.com/a/792831/173055
https://unix.stackexchange.com/a/242028
from service.
Related Issues (20)
- macos: LaunchDaemon Restart implementation should perhaps use kickstart HOT 1
- freebsd: service failed to install
- Container check does not work
- When the service is stopped, getting the service status will return an error of exit status 1
- Logging example fails on Windows Server 2019 HOT 2
- System logs do not work on macOS 12 HOT 1
- The name of the logger is not the name of the service, but the name of the process
- Windows reboot success, but boot fail HOT 2
- In Ubuntu 22.04 start error,but Ubuntu 20.04 start is ok HOT 1
- Linux Systemd Script 'RestartSec' is hard-coded
- The service did not respond to the start or control request in a timely fashion.HELP!!!!! HOT 11
- [SOS] Service is not getting started after updating the OS to macOS 14 HOT 1
- Windows services will only start with the default system account HOT 2
- Windows service get user home is error ? HOT 2
- Will the service main process be forcibly killed by the system when it changes?
- I set the PIDFIle path in the service, but it seems that the pidFile is not generated. Do I need to maintain this file myself?
- PIDFile process wrong
- pidFile should not use double quotes
- win11 install service access is denied
- Missing rcvar field on FreeBSD
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from service.