fi
fi
- if [ -z "$USER" ]; then
+ if [ ! grep -q -e "^USER=" $FIRMA_CONFIG_FILE ]; then
USER="nobody"
fi
- if [ -z "$GROUP" ]; then
+ if [ ! grep -q -e "^GROUP=" $FIRMA_CONFIG_FILE ]; then
GROUP="nobody"
fi
function CheckPermission {
#-------------------------------------------------------------
# check if file has correct permissions (600) and also
- # + if the file is owned by $USER
+ # +if the file is owned by $USER
# +got the idea for this function from backupninja
#
# parameter(s): file name
function CheckListPermissions {
#-------------------------------------------------------------
# check if list files has correct permissions (600) and also
- # + if the files are owned by $USER
+ # +if the files are owned by $USER
#
# parameter(s): list config file
# depends on function(s): CheckPermission