Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add systemd unit #24

Merged
merged 1 commit into from
Dec 25, 2023
Merged

Add systemd unit #24

merged 1 commit into from
Dec 25, 2023

Conversation

hseg
Copy link
Contributor

@hseg hseg commented Dec 22, 2023

Very belated, but I finally wrote the systemd unit.
(Certain idiosyncrasies of my system added unnecessary complications to the
development here, but at least I can finally give you this)

Also includes a configuration template for using gpg as the encryption
backend, which I'd understand if you want to remove. Included it because I had
some difficulty getting gpg to cooperate and thought the next person to use
gpg here might need the pointers.

Closes: #21

Closes: ltratt#21 (very belatedly)
@hseg hseg force-pushed the packaging-conveniences branch from 8c3abad to a0aa9e1 Compare December 22, 2023 13:40
@hseg
Copy link
Contributor Author

hseg commented Dec 22, 2023

Just noticed I had failed to account for code drift since I last touched
pizauth, rebased the PR to simplify history.

@hseg hseg mentioned this pull request Dec 22, 2023
@hseg
Copy link
Contributor Author

hseg commented Dec 22, 2023

Just noticed this PR should also contain an edit to make install to also
install the new files appropriately, will leave this for after the weekend.
(Same applies for #25)

@ltratt
Copy link
Owner

ltratt commented Dec 22, 2023

Thanks for this! We want to put this into some sort of subdir, since it's specific to one platform (and pizauth runs on several). I'm unsure what the convention is on this but I'd be inclined to think that examples/systemd/ would be appropriate (though it looks like apps install these files into lib/systemd/user?).

@hseg
Copy link
Contributor Author

hseg commented Dec 23, 2023 via email

[Service]
Environment="PIZAUTH_STATE_FILE=%S/%N.dump"
ExecStartPost=-sh -c 'age --decrypt --identity AGE_PRIV_KEY -o - "$PIZAUTH_STATE_FILE" | pizauth restore'
ExecStop=
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the empty line deliberate? [I ask naively -- I have no idea!]

@ltratt
Copy link
Owner

ltratt commented Dec 24, 2023

Good point. On reflection this should go into /usr/[local/]share/pizauth and then users can know it's an example rather than a command. I think let's aim to get this in, then I can fiddle with installation instructions when it's in-tree.

@hseg
Copy link
Contributor Author

hseg commented Dec 24, 2023 via email

@hseg
Copy link
Contributor Author

hseg commented Dec 24, 2023 via email

@ltratt
Copy link
Owner

ltratt commented Dec 25, 2023

Thanks! I'm going to merge this and do a little bit of moving around when it's in-tree.

@ltratt ltratt merged commit 2c90d41 into ltratt:master Dec 25, 2023
5 checks passed
@hseg hseg deleted the packaging-conveniences branch December 27, 2023 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Systemd unit?
2 participants