diff options
author | Cleeyv <cleeyv@riseup.net> | 2021-10-01 15:12:05 -0400 |
---|---|---|
committer | tomberek <tomberek@users.noreply.github.com> | 2021-10-25 20:46:24 -0400 |
commit | 57bd54d28b15b871d9aac758a0f5e3686f5bce2b (patch) | |
tree | 49da0fbea2fb0275061a8a3660aa00ee002868a1 /nixos/modules | |
parent | 3473cff4b0ff09f29388558c0f54e7b44f98e2e8 (diff) |
nixos/jibri: add finalize script option
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/networking/jibri/default.nix | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/nixos/modules/services/networking/jibri/default.nix b/nixos/modules/services/networking/jibri/default.nix index cae5ee9931e1e..b4e41a292826b 100644 --- a/nixos/modules/services/networking/jibri/default.nix +++ b/nixos/modules/services/networking/jibri/default.nix @@ -55,11 +55,7 @@ let recording = { recordings-directory = "/tmp/recordings"; -<<<<<<< HEAD finalize-script = "${cfg.finalizeScript}"; -======= - finalize-script = "/path/to/finalize"; # TODO(puck): replace with actual noop default ->>>>>>> a1dc2ddd630 (nixos/jibri: init at 8.0-93-g51fe7a2) }; streaming.rtmp-allow-list = [ ".*" ]; @@ -115,13 +111,33 @@ in exit 0 ''; + defaultText = literalExpression '' + pkgs.writeScript "finalize_recording.sh" '''''' + #!/bin/sh + + RECORDINGS_DIR=$1 + + echo "This is a dummy finalize script" > /tmp/finalize.out + echo "The script was invoked with recordings directory $RECORDINGS_DIR." >> /tmp/finalize.out + echo "You should put any finalize logic (renaming, uploading to a service" >> /tmp/finalize.out + echo "or storage provider, etc.) in this script" >> /tmp/finalize.out + + exit 0 + ''''''; + ''; + example = literalExpression '' + pkgs.writeScript "finalize_recording.sh" '''''' + #!/bin/sh + RECORDINGS_DIR=$1 + ${pkgs.rclone}/bin/rclone copy $RECORDINGS_DIR RCLONE_REMOTE:jibri-recordings/ -v --log-file=/var/log/jitsi/jibri/recording-upload.txt + exit 0 + ''''''; + ''; description = '' This script runs when jibri finishes recording a video of a conference. ''; }; -======= ->>>>>>> a1dc2ddd630 (nixos/jibri: init at 8.0-93-g51fe7a2) xmppEnvironments = mkOption { description = '' XMPP servers to connect to. @@ -321,11 +337,7 @@ in '') cfg.xmppEnvironments)) + '' -<<<<<<< HEAD ${pkgs.jre8_headless}/bin/java -Djava.util.logging.config.file=${./logging.properties-journal} -Dconfig.file=${configFile} -jar ${pkgs.jibri}/opt/jitsi/jibri/jibri.jar --config /var/lib/jibri/jibri.json -======= - ${pkgs.jre_headless}/bin/java -Djava.util.logging.config.file=${./logging.properties-journal} -Dconfig.file=${configFile} -jar ${pkgs.jibri}/opt/jitsi/jibri/jibri.jar --config /var/lib/jibri/jibri.json ->>>>>>> a1dc2ddd630 (nixos/jibri: init at 8.0-93-g51fe7a2) ''; environment.HOME = "/var/lib/jibri"; |