-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an example for user systemd service (#182)
- Loading branch information
Showing
2 changed files
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# systemd user unit file for Linux-Fake-Background-Webcam | ||
# place this file into a location suitable for user-defined systemd units | ||
# (e.g $HOME/.config/systemd/user) | ||
# | ||
# To enable and run the fakecam service, run | ||
# systemctl --user enable fakecam.service | ||
# systemctl --user start fakecam.service | ||
|
||
[Unit] | ||
Description=Fake camera | ||
After=network.target | ||
|
||
[Service] | ||
Type=simple | ||
# specify working directory such as Git project directory | ||
# %h expands to the $HOME directory of the user running the service | ||
WorkingDirectory=%h/devel/fangfufu/Linux-Fake-Background-Webcam | ||
# you can use command line options here, or point the script | ||
# to your config file | ||
ExecStart=python3 fake.py -c %h/.config/fakecam/config.ini | ||
# fake.py exits when pressing Ctrl + \ which corresponds to SIGQUIT | ||
# so we need to specify this kill signal instead of SIGINT | ||
KillSignal=SIGQUIT | ||
|
||
[Install] | ||
WantedBy=default.target |