Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PrivateStorageio
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PrivateStorage
PrivateStorageio
Commits
a3b92748
Commit
a3b92748
authored
3 years ago
by
Florian Sesser
Browse files
Options
Downloads
Patches
Plain Diff
Instead of automatically moving user data around, stop execution of old DB is found
parent
7c514cfc
No related branches found
No related tags found
3 merge requests
!180
merge develop into production
,
!177
merge develop into staging
,
!146
Manage access to payment metrics
Pipeline
#948
failed
3 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nixos/modules/issuer.nix
+7
-11
7 additions, 11 deletions
nixos/modules/issuer.nix
with
7 additions
and
11 deletions
nixos/modules/issuer.nix
+
7
−
11
View file @
a3b92748
...
...
@@ -170,19 +170,15 @@ in {
serviceConfig
.
StateDirectory
=
"zkapissuer"
;
serviceConfig
.
StateDirectoryMode
=
"0750"
;
# Move the DB from its former (root-owned) location if it exists.
# The "--verbose" option for cp and "--changes" for chown mean the
# tools will report if they do something, and stay silent if not.
# Bail if there is still an old (root-owned) DB file on this system.
# If you hit this, and this /var/db/ file is indeed current, move it to
# /var/lib/zkapissuer/vouchers.sqlite3 and chown it to zkapissuer:zkapissuer.
#
# https://www.freedesktop.org/software/systemd/man/systemd.service.html#Command%20lines
# > If the executable path is prefixed with "-", an exit code of the
# > command normally considered a failure (i.e. non-zero exit status or
# > abnormal exit due to signal) is recorded, but has no further effect
# > and is considered equivalent to success.
# [...]
# > If the executable path is prefixed with "+" then the process is executed with full privileges.
# > If the executable path is prefixed with "+" then the process is
# > executed with full privileges.
serviceConfig
.
ExecStartPre
=
[
"-+
${
pkgs
.
coreutils
}
/bin/cp --update --verbose /var/db/vouchers.sqlite3 /var/lib/zkapissuer/vouchers.sqlite3"
"-+
${
pkgs
.
coreutils
}
/bin/chown --changes zkapissuer:zkapissuer /var/lib/zkapissuer/vouchers.sqlite3"
"+
${
pkgs
.
bash
}
/bin/bash -c '[ ! -f /var/db/vouchers.sqlite3 ]'"
];
script
=
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment