mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-24 17:44:52 +00:00
replace activationscripts with systemd
This commit is contained in:
parent
5872abcc33
commit
e309889b0b
@ -20,13 +20,18 @@
|
||||
}];
|
||||
|
||||
# Create videos directory, allow anyone in Jellyfin group to manage it
|
||||
system.activationScripts.jellyfin = let videosDirectory = "/var/videos";
|
||||
in {
|
||||
text = ''
|
||||
if [ ! -d "${videosDirectory}" ]; then
|
||||
$DRY_RUN_CMD mkdir --parents $VERBOSE_ARG ${videosDirectory}
|
||||
$DRY_RUN_CMD chmod 775 $VERBOSE_ARG ${videosDirectory}
|
||||
fi
|
||||
systemd.services.videos-library = {
|
||||
wantedBy = [ "jellyfin.service" ];
|
||||
requiredBy = [ "jellyfin.service" ];
|
||||
before = [ "jellyfin.service" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = let videosDirectory = "/var/videos";
|
||||
in ''
|
||||
mkdir --parents --mode 0755 ${videosDirectory}
|
||||
chown jellyfin:jellyfin ${videosDirectory}
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
|
||||
adminpassFile = "/var/lib/nextcloud/creds";
|
||||
backupS3File = "/var/lib/nextcloud/backup-creds";
|
||||
|
||||
@ -147,7 +148,7 @@ in {
|
||||
before = [ "litestream.service" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "root";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
script = ''
|
||||
echo \
|
||||
|
Loading…
Reference in New Issue
Block a user