Add sample drop-in config
Provide override.conf.sample as a template for customizing systemd environment paths. Changes: - Rename override.conf to override.conf.sample with placeholders and comments - Update README to instruct copying the sample
This commit is contained in:
parent
45b179ede3
commit
acec14553d
3 changed files with 15 additions and 4 deletions
|
|
@ -13,7 +13,7 @@ This script forwards new emails from a source IMAP account (e.g., GMX) to a dest
|
||||||
4. For user services (recommended):
|
4. For user services (recommended):
|
||||||
- Copy services: `cp *.service *.timer ~/.config/systemd/user/`
|
- Copy services: `cp *.service *.timer ~/.config/systemd/user/`
|
||||||
- Copy drop-in: `cp -r email_forwarder.service.d ~/.config/systemd/user/`
|
- Copy drop-in: `cp -r email_forwarder.service.d ~/.config/systemd/user/`
|
||||||
- Edit `~/.config/systemd/user/email_forwarder.service.d/override.conf` to set `PROJECT_DIR` to your project path.
|
- Copy `~/.config/systemd/user/email_forwarder.service.d/override.conf.sample` to `override.conf` and edit to set your PROJECT_DIR and ENV_FILE paths.
|
||||||
|
|
||||||
5. Reload and enable: `systemctl --user daemon-reload && systemctl --user enable email_forwarder.timer && systemctl --user start email_forwarder.timer`
|
5. Reload and enable: `systemctl --user daemon-reload && systemctl --user enable email_forwarder.timer && systemctl --user start email_forwarder.timer`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
[Service]
|
|
||||||
Environment=PROJECT_DIR=/home/jeena/Projects/email_forwarder
|
|
||||||
EnvironmentFile=${PROJECT_DIR}/.env
|
|
||||||
14
email_forwarder.service.d/override.conf.sample
Normal file
14
email_forwarder.service.d/override.conf.sample
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
# Sample systemd drop-in configuration for email_forwarder.service
|
||||||
|
# Copy this file to override.conf and customize the paths for your environment.
|
||||||
|
# For Linux: Set PROJECT_DIR to your project path, ENV_FILE to ./relative/path
|
||||||
|
# For NixOS: Set PROJECT_DIR to /var/lib/email_forwarder, ENV_FILE to /etc/email_forwarder/.env
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
# Path to the email forwarder project directory
|
||||||
|
Environment=PROJECT_DIR=/path/to/your/email_forwarder
|
||||||
|
|
||||||
|
# Path to the .env file (default: ./.env relative to PROJECT_DIR)
|
||||||
|
Environment=ENV_FILE=./.env
|
||||||
|
|
||||||
|
# Load environment variables from the .env file
|
||||||
|
EnvironmentFile=${PROJECT_DIR}/.env
|
||||||
Loading…
Add table
Add a link
Reference in a new issue