Option 2 Enable automatic extension deployment
Enables a systemd service to automatically copy deployed extensions to the LNBits extensions directory. This allows for easier management of extensions by automatically synchronizing extensions located in /var/src/lnbits-extensions/ with the active extensions directory /var/lib/lnbits/extensions/, ensuring the correct permissions are set.
This commit is contained in:
parent
aa4010d35b
commit
44ccc2caa3
1 changed files with 12 additions and 12 deletions
|
|
@ -114,16 +114,16 @@ in
|
|||
#
|
||||
# Option 2: Manually merge deployed extensions with existing ones
|
||||
# Copy deployed extensions into the extensions directory without replacing it:
|
||||
# systemd.tmpfiles.rules = [
|
||||
# "d /var/src/lnbits-extensions 0755 root root - -"
|
||||
# ];
|
||||
# systemd.services.lnbits-copy-extensions = {
|
||||
# description = "Copy deployed LNBits extensions";
|
||||
# before = [ "lnbits.service" ];
|
||||
# wantedBy = [ "lnbits.service" ];
|
||||
# serviceConfig = {
|
||||
# Type = "oneshot";
|
||||
# ExecStart = "${pkgs.bash}/bin/bash -c '${pkgs.rsync}/bin/rsync -av /var/src/lnbits-extensions/ /var/lib/lnbits/extensions/ && ${pkgs.coreutils}/bin/chown -R lnbits:lnbits /var/lib/lnbits/extensions/'";
|
||||
# };
|
||||
# };
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/src/lnbits-extensions 0755 root root - -"
|
||||
];
|
||||
systemd.services.lnbits-copy-extensions = {
|
||||
description = "Copy deployed LNBits extensions";
|
||||
before = [ "lnbits.service" ];
|
||||
wantedBy = [ "lnbits.service" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${pkgs.bash}/bin/bash -c '${pkgs.rsync}/bin/rsync -av /var/src/lnbits-extensions/ /var/lib/lnbits/extensions/ && ${pkgs.coreutils}/bin/chown -R lnbits:lnbits /var/lib/lnbits/extensions/'";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue