{"action":"closed","issue":{"url":"https://api.github.com/repos/systemd/systemd/issues/618","labels_url":"https://api.github.com/repos/systemd/systemd/issues/618/labels{/name}","comments_url":"https://api.github.com/repos/systemd/systemd/issues/618/comments","events_url":"https://api.github.com/repos/systemd/systemd/issues/618/events","html_url":"https://github.com/systemd/systemd/issues/618","id":95841756,"number":618,"title":"please consider having variables for an entire unit file","user":{"login":"Zugschlus","id":1712376,"avatar_url":"https://avatars.githubusercontent.com/u/1712376?v=3","gravatar_id":"","url":"https://api.github.com/users/Zugschlus","html_url":"https://github.com/Zugschlus","followers_url":"https://api.github.com/users/Zugschlus/followers","following_url":"https://api.github.com/users/Zugschlus/following{/other_user}","gists_url":"https://api.github.com/users/Zugschlus/gists{/gist_id}","starred_url":"https://api.github.com/users/Zugschlus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zugschlus/subscriptions","organizations_url":"https://api.github.com/users/Zugschlus/orgs","repos_url":"https://api.github.com/users/Zugschlus/repos","events_url":"https://api.github.com/users/Zugschlus/events{/privacy}","received_events_url":"https://api.github.com/users/Zugschlus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/systemd/systemd/labels/file-parser","name":"file-parser","color":"006b75"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-07-18T17:11:57Z","updated_at":"2015-07-22T17:55:47Z","closed_at":"2015-07-22T17:55:47Z","body":"Hi,\r\n\r\nI'd like to be able to write:\r\n\r\n    Environment=\"CONFFILE=/etc/nifty.conf\"\r\n    [Unit]                                                                          \r\n    Description=my nifty service\r\n    ConditionPathExists=$CONFFILE\r\n    \r\n    [Service]\r\n    ExecStart=/usr/sbin/nifty -f $CONFFILE\r\n\r\nThis does not work at the moment since the Environment directive is part of the Service definition.\r\nWriting the file name explicitly in the unit is possible, but error prone, and there may be situations where the file name is referenced multiple times.\r\n\r\nPlease consider adding a variable mechanism to make systemd unit files more robust.\r\n\r\nGreetings\r\nMarc\r\n\r\n"}}