mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-22 21:35:37 +00:00
move calibre perms out of activations
This commit is contained in:
parent
bfa9e8fc4e
commit
5872abcc33
@ -48,18 +48,20 @@ in {
|
|||||||
}];
|
}];
|
||||||
|
|
||||||
# Create directory and set permissions
|
# Create directory and set permissions
|
||||||
system.activationScripts.calibreLibrary.text = ''
|
systemd.services.calibre-library = {
|
||||||
if [ ! -d "${libraryPath}" ]; then
|
requiredBy = [ "calibre-web.service" ];
|
||||||
$DRY_RUN_CMD mkdir --parents $VERBOSE_ARG ${libraryPath}
|
before = [ "calibre-web.service" ];
|
||||||
fi
|
serviceConfig = {
|
||||||
if [ ! "$(stat -c "%G" ${libraryPath})" = "calibre-web" ]; then
|
Type = "oneshot";
|
||||||
$DRY_RUN_CMD chown $VERBOSE_ARG -R calibre-web:calibre-web ${libraryPath}
|
User = "root";
|
||||||
fi
|
};
|
||||||
if [ ! "$(stat -c "%a" ${libraryPath})" = "775" ]; then
|
script = ''
|
||||||
$DRY_RUN_CMD chmod $VERBOSE_ARG 0775 ${libraryPath}
|
mkdir --parents ${libraryPath}
|
||||||
$DRY_RUN_CMD chmod $VERBOSE_ARG -R 0640 ${libraryPath}/*
|
chown -R calibre-web:calibre-web ${libraryPath}
|
||||||
fi
|
chmod 0775 ${libraryPath}
|
||||||
|
chmod -R 0640 ${libraryPath}/*
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user