Skip to content
This repository has been archived by the owner on Aug 27, 2022. It is now read-only.

Feature: Pre- / Post- Command #232

Merged
merged 2 commits into from
Apr 21, 2021
Merged

Feature: Pre- / Post- Command #232

merged 2 commits into from
Apr 21, 2021

Conversation

jacques42
Copy link
Collaborator

@jacques42 jacques42 commented Apr 8, 2021

Prerequisites checklist

What is the purpose of this pull request? (put an "x" next to an item)

  • New feature

What changes did you make? (Give an overview)

Implement option to

  1. execute a shell command before a picture is taken (pre-command)
  2. execute a shell command after processing is is completed (post-command)

Please define the commands through the admin panel. Change to expert view and see the "Commands" section. It is recommended to define the shell script including it's full path. You can use double-quoation-marks to escape parameters.

Example:

/bin/echo "This is a test"

For collage, the pre-command will be executed ahead of every single collage picture. The post-command will be processed only once, after processing of the full collage is completed.

The shell scripts are executed

  • in async / non-blocking mode.
  • under the priviledges of the web-server, i.e. this is the "www-data" user on a Raspberry Pi OS system.

Script return value and output results are logged to the browser console.

@andi34 Thanks for the great pre-work, there was really little to do in order to get this to the finish line.

andi34 and others added 2 commits April 6, 2021 18:36
feature: add pre- and post-command
- pre-command runs directly after pressing the "Take picture" button
- post-command runs after picture is complete
@jacques42 jacques42 requested a review from andi34 April 8, 2021 20:16
@jacques42 jacques42 merged commit 51a684c into dev Apr 21, 2021
@jacques42 jacques42 deleted the v3/feature/pre-post-command branch June 5, 2021 22:36
DIY89 pushed a commit to DIY89/photobooth that referenced this pull request Jan 20, 2022
…arn/acorn-7.1.1

build(deps): bump acorn from 7.1.0 to 7.1.1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants