init-radosgw.sysv: set ulimit -n before starting daemon
Reviewed-by: Loic Dachary <ldachary@redhat.com>
chown $user $log_file
fi
- if [ $SYSTEMD -eq 1 ]; then
- systemd-run -r bash -c "ulimit -n 32768; $RADOSGW -n $name"
+ if [ -n "$SYSTEMD_RUN" ]; then
+ $SYSTEMD_RUN -r bash -c "ulimit -n 32768; $RADOSGW -n $name"
else
- #start-stop-daemon --start -u $user -x $RADOSGW -- -n $name
- daemon --user="$user" "ulimit -n 32768; $RADOSGW -n $name"
+ ulimit -n 32768
+ daemon --user="$user" "$RADOSGW -n $name"
fi
echo "Starting $name..."
done