Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#46784 - [systemd] ExecStart does not recognize date syntax

Attached to Project: Arch Linux
Opened by Joe Friel (joefri85) - Sunday, 18 October 2015, 22:44 GMT
Last edited by Doug Newgard (Scimmia) - Monday, 19 October 2015, 02:04 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: ExecStart=/usr/bin/ffmpeg -f v4l2 -s 640x480 -i /dev/video0 /home/joefri85/test-"$(date +'%A')".mpg in a service should output a file named test-Sunday.mpg if the day is Sunday but instead it outputs the file test-$(date +'%A').mpg

ffmpeg -f v4l2 -s 640x480 -i /dev/video0 /home/joefri85/test-"$(date +'%A')".mpg outputs a file with the name test-Sunday.mpg


I am trying to run this service at a specific time each day with a systemd timer and name it the day of the week so I can have a full week's worth of video feeds to look back on. systemd does not recognize the syntax that can be normally used in every other situation I have tried. This seems to be a conflict with systemd

Additional info:
* package version(s)
* config and/or log files etc.
this is a service file in /etc/systemd/system named ffmpegd.service

[Unit]
## Displays a description of the service
Description=ffmpeg

## When the service is triggered
After=network.target

[Service]
## Type can be simple, forking (background?), oneshot, notify, dbus, idle
Type=simple

## Runs the service as this user
User=joefri85

## start command
ExecStart=/usr/bin/ffmpeg -f v4l2 -s 640x480 -i /dev/video0 /home/joefri85/"$(date +'%A')".mpg


Steps to reproduce:
create the above service file and run "sudo systemctl start ffmpegd"

This task depends upon

Closed by  Doug Newgard (Scimmia)
Monday, 19 October 2015, 02:04 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Unit files are not shell scripts, this does not work by design. Use the forums or mailing lists if you need help getting it to work.

Loading...