Compare commits
1 commit
c1bf9434ca
...
39302164be
Author | SHA1 | Date | |
---|---|---|---|
Félix Baylac-Jacqué | 39302164be |
|
@ -4861,6 +4861,7 @@ int exec_context_destroy_runtime_directory(const ExecContext *c, const char *run
|
|||
|
||||
/* We execute this synchronously, since we need to be sure this is gone when we start the
|
||||
* service next. */
|
||||
// here
|
||||
(void) rm_rf(p, REMOVE_ROOT);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,12 @@
|
|||
set -ex
|
||||
set -o pipefail
|
||||
|
||||
cat > /usr/bin/create-ro-statedir <<EOF
|
||||
echo "Hello world" > $RUNTIME_DIRECTORY
|
||||
|
||||
/bin/sleep infinity
|
||||
EOF
|
||||
|
||||
cat > /etc/systemd/system/testservice.service <<EOF
|
||||
[Service]
|
||||
ConfigurationDirectory=testservice
|
||||
|
@ -12,7 +18,7 @@ StateDirectory=testservice
|
|||
CacheDirectory=testservice
|
||||
LogsDirectory=testservice
|
||||
RuntimeDirectoryPreserve=yes
|
||||
ExecStart=/bin/sleep infinity
|
||||
ExecStart=sh -x -c 'touch $RUNTIME_DIRECTORY/ro-file && chmod 400 $RUNTIME_DIRECTORY/ro-file $ && /bin/sleep infinity'
|
||||
Type=exec
|
||||
EOF
|
||||
|
||||
|
|
Loading…
Reference in a new issue