cdist configuration management Latest manual: https://www.cdi.st/manual/latest/ Home page: https://www.cdi.st
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
329 B

#!/bin/sh -e
if [ -f "$__object/parameter/file" ]
then
file="$( cat "$__object/parameter/file" )"
else
file="/$__object_id"
fi
if [ -f "$file" ]
then
if [ -s "$file" ]
then
cat "$file"
else
echo "$file is empty" >&2
exit 1
fi
else
echo "$file do not exist" >&2
exit 1
fi