-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
I use your script on my personal computer, and i want to only start deamon when my account logon, so i do a little modification on the daemon version.
No need to change the ownership of the files in the folder
Instead put the service file in /etc/systemd/system/ i put it in :
~/.config/systemd/user/it's my user systemd service launch, in the service file i put this :
[Unit]
Description=Run NeewerLite-Python HTTP Daemon as a service
[Service]
ExecStart=python3 /opt/NeewerLite-Python/NeewerLite-Python.py --http
Restart=on-failure
RestartSec=10
StandardOutput=null
StandardError=journal
[Install]
WantedBy=default.target
I remove the two line of user and group, add the restart line (may be i need to add a force_instance in the exexstart line see with time)
and after that enable the systemd user
systemctl --user daemon-reload
systemctl --user enable neewerlite-python.service
systemctl --uset start neewerlite-python.service
and of course to be sure:
systemctl --user status neewerlite-python.service
result :
neewerlite-python.service - Run NeewerLite-Python HTTP Daemon as a service
Loaded: loaded (/home/my_user/.config/systemd/user/neewerlite-python.service; enabled; preset: disabled)
Active: active (running) since Tue 2023-01-03 09:26:48 CET; 2s ago
Main PID: 36296 (python3)
Tasks: 1 (limit: 38264)
Memory: 35.7M
CPU: 174ms
CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/neewerlite-python.service
└─36296 python3 /opt/NeewerLite-Python/NeewerLite-Python.py --http
And voila it works only for my user :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation